.net bugs
how we can remove the exception "Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack" in my application this type exception is occured so how we can handle it
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Akhil MittalPosted May 15, 2014, 11:44 PM
If you use the Response.End, Response.Redirect, or Server.Transfer method, a ThreadAbortException exception occurs. You can use a try-catch statement to catch this exception.
The Response.End method ends the page execution and shifts the execution to the Application_EndRequest event in the application's event pipeline. The line of code that follows Response.End is not executed.
This problem occurs in the Response.Redirect and Server.Transfer methods because both methods call Response.Endinternally.
To work around this problem, use one of the following methods:
If you use this workaround, the code that follows Response.Redirect is executed.
Akhil MittalPosted May 15, 2014, 11:43 PM
You might find some answers here.
http://support.microsoft.com/kb/312629/EN-US/