View Single Post
  #14 (permalink)  
Old February 20th, 2012, 09:44 AM
JafarKofahi JafarKofahi is offline
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Feb 2012
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts


reading your reply made me do the following test:
1- I explicitly invoked my module.ShowErrorPage from my Default.aspx load event, and it worked fine
2- then I redid the scenario (described in my previous posts), in which the ShowErrorPage is being invoked from a data class method which was called from an ASP.Net page code behind page, and this time it did redirect me to the errorpage (to be honest I am not sure if this was always the case or not, last week I was debugging it and as soon as I get the exception I would stop the program) but I also still got the "unable to evaluate expression" exception on the Redirect line? I am passing the error message via the session, would that have anything to do with it?

To answer your question, in both 1 and 2, the HttpContext.Current had a value.

"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? ": the calls for ShowErrorPage come from ASP.Net pages or the data classes, but all the ones from the data classes, initially comes from ASP.Net pages, wouldnt this mean that there always should be a request?


Last edited by JafarKofahi; February 20th, 2012 at 09:49 AM..