maoyuan121 / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

problem passing elmah log entry id to custom error page #171

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have followed your advice here: 
http://stackoverflow.com/questions/2143146/elmah-using-custom-error-pages-to-
collecting-user-feedback/2211231#2211231

I have tried to use the HttpContext.Items and Session to store the elmah log 
id, but on my custom error page when I try to access the id, I get a null 
reference exception.

As a workaround I have used Server.Transfer in the Elmah Logged event 
(global.asax) to go to the error page, passing the id as a querystring. The 
problem with this is, it circumvents the custom error pages feature of 
ASP.NET and I have to comment out the server.transfer line when developing 
and rememember to uncomment for deployment. Thanks for any help.

Original issue reported on code.google.com by RDOdontplay on 24 May 2010 at 12:43