0

I am using VS2010.

I log my exception in Application_Error and then get automatically redirected to Custom Error page.

On Custom Error page, I would like to display stack track of the error.

I can not implement the approach in following article because I am using ajax controls in all the pages and I get ajax errors if I use the solution in following article.

I updated the web.config as follows:

<customErrors defaultRedirect="~/CustomError.aspx" mode="On" redirectMode="ResponseRewrite" />

The ajax error for the web.config is as follows:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near '

ASP.NET custom error page - Server.GetLastError() is null

I can not use the following approach because I am being told to stay away from session and application level storage.

Asp.net 4.0 : How to get exception details in custom error page?

So what are my options?? is there any other way to store Error information in Application_Error and recover the error stack trace on Custom Error page? This page is automatically being rerouted by asp.net engine.

Community
  • 1
  • 1
dotnet-practitioner
  • 13,158
  • 35
  • 123
  • 195

0 Answers0