WebMethod works fine until it hits the closing braces - throws System.StackOverflowException

N

niama

Hi,

I am getting System.StackOverflowException when calling a web method.
The web method executes fine until it hits the closing braces that is
when the following StackOverflowException is thrown.
"An unhandled exception of type 'System.StackOverflowException'
occurred in mscorlib.dll".

Can someone help me with this?

Thanks in advance,
niama.
 
N

niama

Hi,

Thank you for the reply. Initially when I went through the code, I
could not find any infinite loop. But finally found the source of
error. I use a business class library in the webservice. That business
class library returns an object called Profile which has a list of
objects called Technologies. And each Technology object has a list of
Profile objects. This is actually an n:m relationship which forms a
circular relationship. When webservice trys to return the object, I
think it gets to an infinite loop when it tries to send the result in
XML format. Now it works fine.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top