I ran the app in debug mode, with breakpoints set on all the methods & events and found that the Application_Error event never is reached in either module. Eventually causing the yellow screen of death.
It appears then that if an exception is thrown in the Init method of an IHttpModule implementation, that the whole thing just crashes... is there no way to avoid the yellow screen of death in this case, and display a user friendly error page instead?
jamiebarrow
Member
10 Points
8 Posts
Throwing exception in Http Module's Init
Aug 18, 2011 04:00 PM|LINK
Hi,
If an exception is thrown in the Init method of an Http Module, what are the expected consequences?
I would like to catch an exception thrown in a different module, by a previously registered module. I'm using IIS 7/7.5.
I've registered the modules as below:
Which refer to the below (with details left out):
I ran the app in debug mode, with breakpoints set on all the methods & events and found that the Application_Error event never is reached in either module. Eventually causing the yellow screen of death.
It appears then that if an exception is thrown in the Init method of an IHttpModule implementation, that the whole thing just crashes... is there no way to avoid the yellow screen of death in this case, and display a user friendly error page instead?
Thanks,
James
jamiebarrow
Member
10 Points
8 Posts
Re: Throwing exception in Http Module's Init
Aug 18, 2011 04:02 PM|LINK
And I guess more specifically, what is the process in loading an application's modules on IIS 7?
If anyone has refrences describing the whole process/workflow/lifecycle in detail, it would be much appreciated.