View Single Post
  #13 (permalink)  
Old February 17th, 2012, 08:19 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,032
Thanks: 80
Thanked 1,580 Times in 1,557 Posts
Default

Could it be that the error handler is called for situation outside of the user context? E.g. at places where there is no current Request? This could be the case for errors in Application_Start for example.

Can you test for HttpContext.Current being Nothing?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!