Radhi Radhi - 3 months ago 73
ASP.NET (C#) Question

Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

I am getting the error:


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


I have redirected to a new page in repeater's itemcommand event. The error occurs at the line:

string url = "~/Galleries/AlbumImageList.aspx?UId=" + this.UserId.ToString() + "&AlbumId=" + e.CommandArgument.ToString();
Response.Redirect(url);


Can anybody please help me? Is anything wrong there?
The
_COMPlusExceptionCode
is -
532459699
.

Answer

Make second argument of Response false as shown below.

Response.Redirect(url,false);