JS, images and CSS intercepted by HTTPModule

I have a simple HTTPModule that performs specific user session management.

public void Init(HttpApplication context)
        {
            context.AcquireRequestState += new EventHandler(ProcessBeginRequest);
            ActivityLogger.LogInfo( DateTime.UtcNow.ToLongTimeString() + " In Init " + HttpContext.Current.Request.Url.AbsoluteUri);
        }

and

public void ProcessBeginRequest(object sender, EventArgs e)
        {
            HttpApplication application = sender as HttpApplication;
            ActivityLogger.LogInfo(DateTime.UtcNow.ToLongTimeString() + " In ProcessBeginRequest ");
            if (application != null)
            {
                string requestURL = application.Context.Request.Url.ToString();
                ActivityLogger.LogInfo(DateTime.UtcNow.ToLongTimeString() + " In ProcessBeginRequest " + requestURL);
            }
            return;
        }

When I ran this code with breakpoints, I saw that this module is called even for static files such as images, js and css. Has anyone experienced this? I think that the HTTP modules only connected to events in the http pipeline for asp.net pages. Do they also connect to static resources? Or is it just with a cassini?

Environment: VS2008 - cassini server

PS: Win2k8 IIS7 ( ) ( VS), . , . - - , , ASP.net IIS7 W2k8

Edit1: , Integrated protocol HTTP- http://aspnet.4guysfromrolla.com/articles/122408-1.aspx http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis7/

. , .

Question2: IIS7 ? , , , ? , - , .

+5
2

, .

, ex. , HttpContext.Request.Url.AbsolutePath '/_layouts' SharePoint.

0

All Articles