Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

ASP.NET Error: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

leave a comment »

 

I was working with the page and one silly mistake has taken my mind :P. Could not figure out at first sight but after debug, it would be found out.

I was doing Following:

try
{
    SaveShoppingInformation();
    RedirectToHome();
}
catch (Exception ex)
{
    throw new Exception("User Information: " + SessionHelper.UserInformation + ex.Message,ex);
}

Now the issue is, When you cover the exception on Response.Redirect, it gives the same error. Following is the solution.

try
{
    SaveShoppingInformation();
}
catch (Exception ex)
{
    throw new Exception("User Information: " + SessionHelper.UserInformation + ex.Message,ex);
}
RedirectToHome();

It resolves my issue 🙂

Advertisements

Written by Manish

July 14, 2009 at 9:49 am

Posted in .NET, .NET 3.0

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: