IHttpModule 配置方法

Posted Young_汨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IHttpModule 配置方法相关的知识,希望对你有一定的参考价值。

<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <appSettings />
  <connectionStrings />
  <system.web>
    <authentication mode="Windows" />
   
    <httpModules>
      <!--iis 经典模式或者iis6.0 以下-->
      <add name="my" type="WebTest.Module.MyModule,WebTest"/>
    </httpModules>
  </system.web>

  <system.webServer>
    <modules>
      <!--iis 集成模式配置方式-->
      <add name="my" type="WebTest.Module.MyModule,WebTest"/>
    </modules>
  </system.webServer>
</configuration>

 

以上是关于IHttpModule 配置方法的主要内容,如果未能解决你的问题,请参考以下文章

asp.net实现IHttpModule接口注意事项

扩展 IHttpModule

.NET MVC5简介HttpHandler

IHttpModule在webconfig中的注册

IHttpHandler 与 IHttpModule

单元测试 IHttpModule