zoukankan      html  css  js  c++  java
  • IIS7 里注册HttpModule和IIS6 里注册时候 在WEB.CONFIG里有所不同

    The only weird part here is getting a handle to the logger. I’m using an IoC container in my application, however I can’t tell IIS how to build up my RequestDurationLoggerModule, so I’m stuck using the Service Locator pattern. The container could be a singleton, but I don’t like singletons, so I implemented IServiceProvider in Global.asax instead. All that’s left now is wiring in the module. Since Cassini behaves like IIS6, you have to use the legacy style configuration, which looks like this:

      <system.web>
        <httpModules>
          <addname="..."type="MyApplication.RequestDurationLoggerModule, MyApplication"/>
        </httpModules>
      </system.web>
     

    For IIS7 though, you add it like this:

      <system.webServer>
        <modules>
          <addname="..."type="MyApplication.RequestDurationLoggerModule, MyApplication"/>
        </modules>
      </system.webServer>
  • 相关阅读:
    自我介绍
    秋季学期总结
    第七周编程总结
    第六周作业
    第五周编程总结
    第四周编程总结
    第三周作业
    第二周作业
    抓老鼠啊~亏了还是赚了
    币值转换
  • 原文地址:https://www.cnblogs.com/shineqiujuan/p/3112544.html
Copyright © 2011-2022 走看看