472,352 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

Needed help on 'System.StackOverflowException'

Dear all,

I'm new to C# WebServices. I compile the WebService project it return no
errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method it is
working fine. Then when I try to invoke the second method it return me an
error, Just In-Time Debugging, with error message
"An exception 'System.StackOverflowException' has occurred in WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.
Nov 23 '05 #1
10 14388
it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a funtcion ,
a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
Dear all,

I'm new to C# WebServices. I compile the WebService project it return no
errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method it is
working fine. Then when I try to invoke the second method it return me an
error, Just In-Time Debugging, with error message
"An exception 'System.StackOverflowException' has occurred in WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.

Nov 23 '05 #2
Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?
"erymuzuan" wrote:
it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a funtcion ,
a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
Dear all,

I'm new to C# WebServices. I compile the WebService project it return no
errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method it is
working fine. Then when I try to invoke the second method it return me an
error, Just In-Time Debugging, with error message
"An exception 'System.StackOverflowException' has occurred in WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.

Nov 23 '05 #3
If you are the developer of the Web service, i.e. if you have access to
the code then you can always add a try/catch block around the lines in
your WebMethod:

[WebMethod]
public void MyMethod()
{
try
{
}
catch( Exception ex )
{
System.Diagnostics.Debug.WriteLine( ex.ToString() );
}
}

and run DebugView from www.sysinternals.com to read the error message.

If it's an ASP.NET web service with simple parameter types and you can
convince the owner to allow you to see the full exception messages by
setting
<customErrors
mode="Off">
in the service's web.config file, then you may want to try invoking the
web service from the browser by navigating to the service's URL and
entering the parameter values on the test page.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

-----Original Message-----
From: Mae Lim [mailto:Ma****@discussions.microsoft.com]
Posted At: Sunday, January 02, 2005 6:45 PM
Posted To: microsoft.public.dotnet.framework.webservices
Conversation: Needed help on 'System.StackOverflowException'
Subject: Re: Needed help on 'System.StackOverflowException'

Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?
"erymuzuan" wrote:
it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a funtcion ,
a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
Dear all,

I'm new to C# WebServices. I compile the WebService project it
return no errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first
method it
is working fine. Then when I try to invoke the second method it
return me
an error, Just In-Time Debugging, with error message
"An exception 'System.StackOverflowException' has occurred in WebServices"
What is the problem ? How to resolve it ?

Thanks in advance.


Nov 23 '05 #4
Hi Christoph,

I already added a try/catch block in the WebMethod. I've downloaded the
tools "DebugView", but how this tool help to trace the StackOverflowException
? When I try to run the "DebugView" it doesn't seem to catch any errors.

Please guide me. Thanks.
"Christoph Schittko [MVP]" wrote:
If you are the developer of the Web service, i.e. if you have access to
the code then you can always add a try/catch block around the lines in
your WebMethod:

[WebMethod]
public void MyMethod()
{
try
{
}
catch( Exception ex )
{
System.Diagnostics.Debug.WriteLine( ex.ToString() );
}
}

and run DebugView from www.sysinternals.com to read the error message.

If it's an ASP.NET web service with simple parameter types and you can
convince the owner to allow you to see the full exception messages by
setting
<customErrors
mode="Off">
in the service's web.config file, then you may want to try invoking the
web service from the browser by navigating to the service's URL and
entering the parameter values on the test page.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko

-----Original Message-----
From: Mae Lim [mailto:Ma****@discussions.microsoft.com]
Posted At: Sunday, January 02, 2005 6:45 PM
Posted To: microsoft.public.dotnet.framework.webservices
Conversation: Needed help on 'System.StackOverflowException'
Subject: Re: Needed help on 'System.StackOverflowException'

Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?
"erymuzuan" wrote:
it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a funtcion , a classic exmaple

public string SayHello()
{
return SayHello();
}

Regards
Erymuzuan Mustapa

Mae Lim wrote:
> Dear all,
>
> I'm new to C# WebServices. I compile the WebService project it

return
no
> errors "Build: 1 succeeded, 0 failed, 0 skipped".
>
> Basically I have 2 WebMethod, when I try to invoke the first

method it
is
> working fine. Then when I try to invoke the second method it

return me
an
> error, Just In-Time Debugging, with error message
> "An exception 'System.StackOverflowException' has occurred in

WebServices"
>
> What is the problem ? How to resolve it ?
>
> Thanks in advance.


Nov 23 '05 #5
Hello Mae,
One option is you could see the stack trace of the exception if at all
and determine parts of yr code that are hit before the exception is thrown.
If yr using VS.net but a breakpoint in the begining of the method and step
through you code. To do this you need to use VS.net Debug Processes and attach
to aspnet_wp.exe or w3wp.exe.

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?

"erymuzuan" wrote:
it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a
funtcion , a classic exmaple

public string SayHello()
{
return SayHello();
}
Regards
Erymuzuan Mustapa
Mae Lim wrote:
Dear all,

I'm new to C# WebServices. I compile the WebService project it
return no errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method
it is working fine. Then when I try to invoke the second method it
return me an error, Just In-Time Debugging, with error message "An
exception 'System.StackOverflowException' has occurred in
WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.

Nov 23 '05 #6
Hi Dilip,

I would like to know how do I use the VS.net Debug Processes and attach
to aspnet_wp.exe or w3wp.exe ?
"Dilip Krishnan" wrote:
Hello Mae,
One option is you could see the stack trace of the exception if at all
and determine parts of yr code that are hit before the exception is thrown.
If yr using VS.net but a breakpoint in the begining of the method and step
through you code. To do this you need to use VS.net Debug Processes and attach
to aspnet_wp.exe or w3wp.exe.

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?

"erymuzuan" wrote:
it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a
funtcion , a classic exmaple

public string SayHello()
{
return SayHello();
}
Regards
Erymuzuan Mustapa
Mae Lim wrote:

Dear all,

I'm new to C# WebServices. I compile the WebService project it
return no errors "Build: 1 succeeded, 0 failed, 0 skipped".

Basically I have 2 WebMethod, when I try to invoke the first method
it is working fine. Then when I try to invoke the second method it
return me an error, Just In-Time Debugging, with error message "An
exception 'System.StackOverflowException' has occurred in
WebServices"

What is the problem ? How to resolve it ?

Thanks in advance.


Nov 23 '05 #7
Hello Mae,
In visual studio use the menu option Debug->Process... That will give you
a dialog box select aspnet_wp.exe if yr using XP or look for w3wp.exe in
Win2k3

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi Dilip,

I would like to know how do I use the VS.net Debug Processes and
attach to aspnet_wp.exe or w3wp.exe ?

"Dilip Krishnan" wrote:
Hello Mae,
One option is you could see the stack trace of the exception if at
all
and determine parts of yr code that are hit before the exception is
thrown.
If yr using VS.net but a breakpoint in the begining of the method and
step
through you code. To do this you need to use VS.net Debug Processes
and attach
to aspnet_wp.exe or w3wp.exe.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?

"erymuzuan" wrote:

it's hard to tell, without looking a the code, but most of the time
StackOverflowException thrown when there's infinite loop in a
funtcion , a classic exmaple

public string SayHello()
{
return SayHello();
}
Regards
Erymuzuan Mustapa
Mae Lim wrote:
> Dear all,
>
> I'm new to C# WebServices. I compile the WebService project it
> return no errors "Build: 1 succeeded, 0 failed, 0 skipped".
>
> Basically I have 2 WebMethod, when I try to invoke the first
> method it is working fine. Then when I try to invoke the second
> method it return me an error, Just In-Time Debugging, with error
> message "An exception 'System.StackOverflowException' has occurred
> in WebServices"
>
> What is the problem ? How to resolve it ?
>
> Thanks in advance.
>

Nov 23 '05 #8
Hi Dilip,

I had follow the steps you mentioned, so what is the next step ? After debug
process, how do I know what is the result out of it ?

"Dilip Krishnan" wrote:
Hello Mae,
In visual studio use the menu option Debug->Process... That will give you
a dialog box select aspnet_wp.exe if yr using XP or look for w3wp.exe in
Win2k3

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi Dilip,

I would like to know how do I use the VS.net Debug Processes and
attach to aspnet_wp.exe or w3wp.exe ?

"Dilip Krishnan" wrote:
Hello Mae,
One option is you could see the stack trace of the exception if at
all
and determine parts of yr code that are hit before the exception is
thrown.
If yr using VS.net but a breakpoint in the begining of the method and
step
through you code. To do this you need to use VS.net Debug Processes
and attach
to aspnet_wp.exe or w3wp.exe.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi erymuzuan,

How do I trace where is the StackOverflowException is thrown in the
WebServices ? Is there any tools that I can use ?

"erymuzuan" wrote:

> it's hard to tell, without looking a the code, but most of the time
> StackOverflowException thrown when there's infinite loop in a
> funtcion , a classic exmaple
>
> public string SayHello()
> {
> return SayHello();
> }
> Regards
> Erymuzuan Mustapa
> Mae Lim wrote:
>> Dear all,
>>
>> I'm new to C# WebServices. I compile the WebService project it
>> return no errors "Build: 1 succeeded, 0 failed, 0 skipped".
>>
>> Basically I have 2 WebMethod, when I try to invoke the first
>> method it is working fine. Then when I try to invoke the second
>> method it return me an error, Just In-Time Debugging, with error
>> message "An exception 'System.StackOverflowException' has occurred
>> in WebServices"
>>
>> What is the problem ? How to resolve it ?
>>
>> Thanks in advance.
>>


Nov 23 '05 #9
Hello Mae,
Put a break point on the web method yr debugging, Invoke the service.
and step through the code... For indepth explanation refer http://msdn.microsoft.com/library/de...pplication.asp

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi Dilip,

I had follow the steps you mentioned, so what is the next step ? After
debug process, how do I know what is the result out of it ?

"Dilip Krishnan" wrote:
Hello Mae,
In visual studio use the menu option Debug->Process... That will give
you
a dialog box select aspnet_wp.exe if yr using XP or look for w3wp.exe
in
Win2k3
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi Dilip,

I would like to know how do I use the VS.net Debug Processes and
attach to aspnet_wp.exe or w3wp.exe ?

"Dilip Krishnan" wrote:

Hello Mae,
One option is you could see the stack trace of the exception if at
all
and determine parts of yr code that are hit before the exception is
thrown.
If yr using VS.net but a breakpoint in the begining of the method
and
step
through you code. To do this you need to use VS.net Debug Processes
and attach
to aspnet_wp.exe or w3wp.exe.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
> Hi erymuzuan,
>
> How do I trace where is the StackOverflowException is thrown in
> the WebServices ? Is there any tools that I can use ?
>
> "erymuzuan" wrote:
>
>> it's hard to tell, without looking a the code, but most of the
>> time StackOverflowException thrown when there's infinite loop in
>> a funtcion , a classic exmaple
>>
>> public string SayHello()
>> {
>> return SayHello();
>> }
>> Regards
>> Erymuzuan Mustapa
>> Mae Lim wrote:
>>> Dear all,
>>>
>>> I'm new to C# WebServices. I compile the WebService project it
>>> return no errors "Build: 1 succeeded, 0 failed, 0 skipped".
>>>
>>> Basically I have 2 WebMethod, when I try to invoke the first
>>> method it is working fine. Then when I try to invoke the second
>>> method it return me an error, Just In-Time Debugging, with error
>>> message "An exception 'System.StackOverflowException' has
>>> occurred in WebServices"
>>>
>>> What is the problem ? How to resolve it ?
>>>
>>> Thanks in advance.
>>>

Nov 23 '05 #10
One additional note, you will need to set the "Application Protection" for
the virtual directory where your web service lives to "Low (IIS Process)" in
order for your breakpoint to be hit.

Allen

"Dilip Krishnan" wrote:
Hello Mae,
Put a break point on the web method yr debugging, Invoke the service.
and step through the code... For indepth explanation refer http://msdn.microsoft.com/library/de...pplication.asp

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi Dilip,

I had follow the steps you mentioned, so what is the next step ? After
debug process, how do I know what is the result out of it ?

"Dilip Krishnan" wrote:
Hello Mae,
In visual studio use the menu option Debug->Process... That will give
you
a dialog box select aspnet_wp.exe if yr using XP or look for w3wp.exe
in
Win2k3
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi Dilip,

I would like to know how do I use the VS.net Debug Processes and
attach to aspnet_wp.exe or w3wp.exe ?

"Dilip Krishnan" wrote:

> Hello Mae,
> One option is you could see the stack trace of the exception if at
> all
> and determine parts of yr code that are hit before the exception is
> thrown.
> If yr using VS.net but a breakpoint in the begining of the method
> and
> step
> through you code. To do this you need to use VS.net Debug Processes
> and attach
> to aspnet_wp.exe or w3wp.exe.
> HTH
> Regards,
> Dilip Krishnan
> MCAD, MCSD.net
> dkrishnan at geniant dot com
> http://www.geniant.com
>> Hi erymuzuan,
>>
>> How do I trace where is the StackOverflowException is thrown in
>> the WebServices ? Is there any tools that I can use ?
>>
>> "erymuzuan" wrote:
>>
>>> it's hard to tell, without looking a the code, but most of the
>>> time StackOverflowException thrown when there's infinite loop in
>>> a funtcion , a classic exmaple
>>>
>>> public string SayHello()
>>> {
>>> return SayHello();
>>> }
>>> Regards
>>> Erymuzuan Mustapa
>>> Mae Lim wrote:
>>>> Dear all,
>>>>
>>>> I'm new to C# WebServices. I compile the WebService project it
>>>> return no errors "Build: 1 succeeded, 0 failed, 0 skipped".
>>>>
>>>> Basically I have 2 WebMethod, when I try to invoke the first
>>>> method it is working fine. Then when I try to invoke the second
>>>> method it return me an error, Just In-Time Debugging, with error
>>>> message "An exception 'System.StackOverflowException' has
>>>> occurred in WebServices"
>>>>
>>>> What is the problem ? How to resolve it ?
>>>>
>>>> Thanks in advance.
>>>>


Nov 23 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Martyn Wynne | last post by:
Hi, Can anyone please tell me if there is any reason why when i am streaming from a webrequest (decompressing on route) to a file on the hard...
2
by: Anders Both | last post by:
In a system with asynkronius socket and different collection, there are some times throw a System.StackOverflowException . I cannot really figur...
12
by: Amy | last post by:
I'm getting a System.StackOverflowException, and I can't see why. Here's the code that's throwing the exception. I don't see anyting that's...
3
by: Patrick.O.Ige | last post by:
Error:- System.StackOverflowException: Exception of type System.StackOverflowException was thrown. When is this thrown.. Any ideas
0
by: Nikhil Khade | last post by:
Hello, After around 3 months, I reopened a old VB.NET solutions which used to work (and build) without any errors. Just to test it again, I build...
2
by: Modica82 | last post by:
Hi all, I am trying to generate a stub class for my web service using wsdl.exe but every time i run it from the visual studio command prompt i...
1
by: HyVong | last post by:
Hi Everyone, please help, i'm very frustrated because i can't run my application. I built my application using the .NET Installer, i ran the...
12
by: daz_oldham | last post by:
Hi everyone As my expedition into OOP takes another shaky step, I now am getting the error: An unhandled exception of type...
1
by: vighnesh | last post by:
Hi All Can anyone please let me know how to catch an unhandled exception like " An Unhandled exception of type 'system.stackoverflowexception'...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.