IIS7 里注册HttpModule和IIS6 里注册时候 在WEB.CONFIG里有所不同
2013-06-01 15:47
357 查看
Theonlyweirdparthereisgettingahandletothelogger.I’musinganIoCcontainerinmyapplication,howeverIcan’ttellIIShowtobuildupmyRequestDurationLoggerModule,soI’mstuckusingtheServiceLocatorpattern.Thecontainercouldbeasingleton,butIdon’tlikesingletons,soIimplementedIServiceProviderinGlobal.asaxinstead.Allthat’sleftnowiswiringinthemodule.SinceCassinibehaveslikeIIS6,youhavetousethelegacystyleconfiguration,whichlookslikethis:
ForIIS7though,youadditlikethis:
<system.web>
<httpModules>
<addname="..."type="MyApplication.RequestDurationLoggerModule,MyApplication"/>
</httpModules>
</system.web>
ForIIS7though,youadditlikethis:
<system.webServer>
<modules>
<addname="..."type="MyApplication.RequestDurationLoggerModule,MyApplication"/>
</modules>
</system.webServer>
相关文章推荐
- IIS7、IIS6 web.config注册HttpModule
- IIS7 / IIS6 HttpMoudles 在web.config 中不同的配置
- 在WebConfig中注册自定义HttpModule的方法
- IHttpModule在webconfig中的注册
- 在ii7+与iis6上注册自定义HttpModule和HttpHandlers
- iis6|iis7|配置URLRewriter|64位操作系统下|.net2.0|.net4.0|配置URLRewriter|Web.config配置详情
- web.config add handlers and httpmodule to System.Web section.
- The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type="MagicAjax.MagicAja
- webconfig 配置 IHttpModule
- 错误:The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type="MagicAjax.Magic
- IIS6 IIS7使用web.config进行301重定向
- The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type
- URL重写之在IIS7中使用HttpModule,在IIS5和IIS6中使用 ISAPIRewrite实现无扩展名的URL重写(节选自福娃儿)
- asp.net 利用Web.config的HttpModule 实现整站301永久重定向(简单方便)
- 301重定向1:利用Web.config的HttpModule实现整站301永久重定向
- iis7针对不同域名配置不同运行权限,所有共用web.config产生的问题均可以修改根配置文件解决
- 不通过web.config在运行时注册httpmodules
- 将Web站点由IIS6迁移至IIS7
- iis7 发布mvc3 遇到的HTTP错误 403.14-Forbidden Web 服务器被配置为不列出此目录的内容
- web.config 中的HttpHandler中配置节中的正则表达式浅析