I have an httpModule which has to run before an ActionMethod. I dont want that it is executed when a request for an image comes in.
For some reasons I realy need an HttpModule and cant use an ActionFilter
What is the way to do this?
public class PostAuthenticateModule : IHttpModule
{
public void Init(HttpApplication app)
{
app.PostAuthenticateRequest += new EventHandler(this.OnEnter);
}
private void OnEnter(object source, EventArgs eventArgs)
{
}
private static void Initialize()
{
}
public void Dispose()
{
}
}
web.config
<httpModules>
<add type="PostAuthenticateModule.PostAuthenticateModule , PostAuthenticateModule" name="PostAuthenticateModule"/>
</httpModules>