An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

Posted by Sahar on Stack Overflow See other posts from Stack Overflow or by Sahar
Published on 2010-05-06T15:42:36Z Indexed on 2010/05/06 15:48 UTC
Read the original article Hit count: 329

Filed under:

Hello everybody i wrote a code in asp.net that read data from files and draw a graph. It worked but after awhile when i run the program, this exception arise "An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll" in this statement in the code:

if (File.Exists(fName)) <----(here is the exception)
{
    stream = File.Open(fName, FileMode.Open);
    g_day = Deserialize(stream);
    stream.Close();
    int cn = 0;
    if (g_day.Values.Count != 0)
        cn = g_day.Values[g_day.Values.Count - 1].Value;
    Label1.Text = cn.ToString();
}

can u help me

© Stack Overflow or respective owner

Related posts about asp.net-membership