.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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Akhil MittalRank #133 · 16.9K reputationPosted May 15, 2014, 7:43 PM EDT
You might find some answers here.
http://support.microsoft.com/kb/312629/EN-US/
Akhil MittalRank #133 · 16.9K reputationPosted May 15, 2014, 7:44 PM EDT
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.