HTTP handler
To register an HTTP handler for IIS 6.0
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="SampleHandler.new"
type="SampleHandler, SampleHandlerAssembly" />
</httpHandlers>
<system.web>
</configuration>
To register an HTTP handler for IIS 7.0 running in Classic mode
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="SampleHandler.new"
type="SampleHandler, SampleHandlerAssembly" />
</httpHandlers>
<system.web>
<system.webServer>
<add name=SampleHandler" verb="*" path="SampleHandler.new"
Modules="IsapiModule"
scriptProcessor="FrameworkPath\aspnet_isapi.dll"
resourceType="File" />
</system.webServer>
</configuration>
To register an HTTP handler for IIS 7.0 running in Integrated Mode
<configuration>
<system.webServer>
<handlers>
<add name="SampleHandler" verb="*"
path="SampleHandler.new"
type="SampleHandler, SampleHandlerAssembly"
resourceType="Unspecified" />
</handlers>
<system.webServer>
</configuration>
HTTP Module
To register the module for IIS 6.0 and IIS 7.0 running in Classic mode
<configuration>
<system.web>
<httpModules>
<add name="HelloWorldModule" type="HelloWorldModule"/>
</httpModules>
</system.web>
</configuration>
To register the module for IIS 7.0 running in Integrated mode
<configuration>
<system.webServer>
<modules>
<add name="HelloWorldModule" type="HelloWorldModule"/>
</modules>
</system.webServer>
</configuration>
http://msdn.microsoft.com/en-us/library/ms227673%28v=VS.100%29.aspx
http://msdn.microsoft.com/en-us/library/46c5ddfy.aspx
本文介绍了如何在不同版本的IIS中配置HTTP处理器与HTTP模块,包括IIS 6.0、IIS 7.0的经典模式及集成模式。通过XML配置示例详细展示了注册HTTP处理器和模块的方法。
1万+

被折叠的 条评论
为什么被折叠?



