Event handlers can only be bound to HttpApplication events during IHttpModule initialization.

If you ever get this error it is because you are trying to access the HttpApplication context outside of its intialisation pipeline and more than likely you are using IIS7.

This error is easily fixed you must add this code block to your Global.asax and move the offending code inside it and no more errors :)

public override void Init()
{
    base.Init();
    //offending code here
}

0 Responses to “Event handlers can only be bound to HttpApplication events during IHttpModule initialization.”


  • No Comments

Leave a Reply