没有使用VisualStudio运行的HttpModule?

  • 回答 (2)
  • 关注 (0)
  • 查看 (58)

配置如下所示:

<system.webServer>
        <modules>
            <add name="MinimizeModule" type="ClipperHouse.UrlMinimizer.MinimizeModule" />
        </modules>...
工口Miku工口Miku提问于
叶舞-冷听回答于

如果在IIS 7上运行:

<configuration>
   <system.webServer>
      <modules>
         <add name="MinimizeModule" type="ClipperHouse.UrlMinimizer.MinimizeModule" />
      </modules>
   </system.webServer>
</configuration>

如果在Cassini(VisualStudio的集成微型Web服务器)上运行,请将模块放在:

<configuration>
   <system.web>
      <httpModules>
          <add name="MinimizeModule" type="ClipperHouse.UrlMinimizer.MinimizeModule" />
   </system.web>
</configuration>

确保部署web.config

<system.web>
   <!--The Cassini location to add modules (comment out for IIS)-->
   <httpModules>
      <!--WARNING: IIS will crash if you leave this in here.
          IISBUG: IIS doesn't support system.web/httpModules, 
          and Cassini doesn't support system.webServer/modules
      -->
      <!--Comment out for IIS-->
      <add name="PerformanceHttpModule" type="DummyPlaceholder.PerformanceHttpModule"/>
   </httpModules>
</system.web>

<system.webServer>
   <!--The IIS7 location to add modules (comment out for Cassini)
   <modules runAllManagedModulesForAllRequests="true">
      <!--IIS7 will crash if you present a system.web httpModules. -->
      <remove name="PerformanceHttpModule" />
      <add name="PerformanceHttpModule" type="DummyPlaceholder.PerformanceHttpModule"/>
   </modules>
</system.webServer>
独善其身不思进取的码农回答于

IIS提供的开发web服务器使用IIS 6模块语法

<system.web>
  <httpModules>
    <add name="MinimizeModule" type="ClipperHouse.UrlMinimizer.MinimizeModule" />
  </httpModules>
</system.web>


<system.webServer>
  <validation validateIntegratedModeConfiguration="false"/>
  <modules>
    <remove name="MinimizeModule" />
    <add name="MinimizeModule" type="ClipperHouse.UrlMinimizer.MinimizeModule" 
         preCondition="managedHandler" />
  </modules>
</system.webServer>

所属标签

可能回答问题的人

  • 找虫虫

    0 粉丝0 提问6 回答
  • 不吃貓的鱼oo

    5 粉丝466 提问5 回答
  • 优惠活动秘书

    0 粉丝2 提问5 回答
  • 爸爸

    腾讯 · 客户端安全 (已认证)

    4 粉丝4 提问5 回答

扫码关注云+社区

领取腾讯云代金券