Home > ASP.NET, Technology > ASP.NET StackOverflowException

ASP.NET StackOverflowException

What do you do when ASP.NET throws an exception like this?

Exception of type System.StackOverflowException was thrown.

Description: An
unhandled exception occurred during the execution of the current web request. Please
review the stack trace for more information about the error and where it originated
in the code.

Exception Details: System.StackOverflowException: Exception of type System.StackOverflowException
was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:

[StackOverflowException: Exception of type System.StackOverflowException was thrown.]


Version Information: Microsoft .NET Framework
Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Categories: ASP.NET, Technology Tags:
  1. Dan
    October 18th, 2003 at 03:34 | #1

    You look at your recent changes for a recursive call.

  2. amit
    November 24th, 2003 at 21:18 | #2

    Hi There,

    If you are using something like Value Objects to move data from ur xxx.aspx.cs to your delegates. Then thers one solution, Take care while creating your ValueObjectClass. ( Dont declare attributes of your value object as property i mean with get and set ). This will work fine.

    Please feel free to contact me if u have any further queries or it dosent solev ur problem.

    Amit

  3. Zhang Qi
    February 7th, 2004 at 23:44 | #3

    Hi:
    Every time I use property, such as
    public string test
    {
    get
    {
    return test;
    }
    set
    {
    test = value;
    }
    }
    this error occur, why this happen? Is it a bug? or any reasonable thing in it?
    Thank you

    Qi

  4. Zhang Qi
    February 8th, 2004 at 00:00 | #4

    Hi:
    Every time I use property, such as
    public string test
    {
    get
    {
    return test;
    }
    set
    {
    test = value;
    }
    }
    this error occur, why this happen? Is it a bug? or any reasonable thing in it?
    Thank you

    Qi

  5. Ben
    January 24th, 2005 at 23:15 | #5

    If you use a property like this:

    public string test
    {
    set
    {
    test=value;
    }
    }

    What you are doing is making an endless recursive call because you are setting the public string value with it’s own value.

    You want something more like this:

    private string secretTest;

    public string test
    {
    set
    {
    secretTest=value;
    }
    }

    When I get a stack overflow it is almost always because my public variable is called something like ThisString and my private one is called thisString and I typo and give them the same name.

  1. No trackbacks yet.