Why can event handlers can only be bound to HttpApplication events during IHttpModule initialization
- by Venemo
This is just another "working in dev server, why not working in IIS" type question.
So, I created a nice DAL using NHibernate as described here. When creating an ISession, I hook up an event handler to the HttpApplication.EndRequest to take care of cleaning it up.
However, I deployed my site to IIS and it says:
Event handlers can only be bound to HttpApplication events during IHttpModule initialization.
Since when?
What for?
Why?
How can I bypass it?