User763059395 posted
My HttpModule is only executing on the first run of the application? What would cause this to happen? This is a module that I am using to Authenticate requests instead of a Global.asax. This is really baffling to me.
User763059395 posted
I found the problem. // my code class MyModule : IHttpModule { HttpContext Context; public void Init (HttpApplication application) {
Context = application.Context; .... } Applicaton_BeginRequest (...) { // use Context here } ... }
-- it should be -- // correct code class MyModule : IHttpModule { public void Init (HttpApplication application) { .... } Applicaton_BeginRequest (...) {
HttpContext Context = ((HttpApplication)sender).Context; // use Context here } ... }