JS,Images and CSS getting intercepted by HTTPModule

后端 未结 2 502
天命终不由人
天命终不由人 2021-01-01 02:52

I have a simple HTTPModule which does some custom session state management.

public void Init(HttpApplication context)
        {
            context.AcquireRe         


        
相关标签:
2条回答
  • 2021-01-01 02:55

    Yes, it will be called for any type of files.

    It's typical in those modules to filter out whatever you are not interested in for ex. by checking whether HttpContext.Request.Url.AbsolutePath contains '/_layouts' under SharePoint.

    0 讨论(0)
  • 2021-01-01 03:04

    Looks like there is a way to do it

    http://learn.iis.net/page.aspx/121/iis-70-modules-overview/#Disabling

    setting preCondition="managedHandler" and <modules runAllManagedModulesForAllRequests="false" /> would do the trick

    note to self: http://code.google.com/p/talifun-web/wiki/StaticFileHandler need to explore this StaticFileHandler

    references:

    http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/

    Exclude HttpModule from running for static content on IIS7

    BUG: IIS7 managed requests

    http://msdn.microsoft.com/en-us/library/bya7fh0a.aspx

    0 讨论(0)
提交回复
热议问题