T
tbh
in an error path in an aspx script under DotNet 2, IIS6, Win2003 Server I
get the following error (which I don't understand) on Respone.End():
{Unable to evaluate expression because the code is optimized or a native
frame is on top of the call stack.}
i'm attempting to abort execution with an error and have tried for example:
System.Web.HttpResponse response =
System.Web.HttpContext.Current.Response;
response.Clear();
response.Status = "400 Bad Request";
response.End();
inside try {} catch {}. when I step through with a debugger control
transfers after response.End() to a catch clause with the exception listed
above.
any ideas what could be causing this and what I can do about it? (i'd like
to avoid 5xx errors in favor of 4xx ones when the problem is a request for
something that isn't there -- as opposed to badly broken code.)
cheers,
Tim Hanson
get the following error (which I don't understand) on Respone.End():
{Unable to evaluate expression because the code is optimized or a native
frame is on top of the call stack.}
i'm attempting to abort execution with an error and have tried for example:
System.Web.HttpResponse response =
System.Web.HttpContext.Current.Response;
response.Clear();
response.Status = "400 Bad Request";
response.End();
inside try {} catch {}. when I step through with a debugger control
transfers after response.End() to a catch clause with the exception listed
above.
any ideas what could be causing this and what I can do about it? (i'd like
to avoid 5xx errors in favor of 4xx ones when the problem is a request for
something that isn't there -- as opposed to badly broken code.)
cheers,
Tim Hanson