当前位置首页 > IIS知识

在ii7+与iis6上注册自定义HttpModule和HttpHandlers

阅读次数:331 次  来源:admin  发布时间:

HTTP handler To register an HTTP handler for IIS 6.0

<configuration>

lt;system.web>

lt;httpHandlers>

lt;add verb="*" path="SampleHandler.new"

type="SampleHandler, SampleHandlerAssembly" />

lt;/httpHandlers>

lt;system.web>

lt;/configuration>

To register an HTTP handler for IIS 7.0 running in Classic mode

<configuration>

lt;system.web>

lt;httpHandlers>

lt;add verb="*" path="SampleHandler.new"

type="SampleHandler, SampleHandlerAssembly" />

lt;/httpHandlers>

lt;system.web>

lt;system.webServer>

lt;add name=SampleHandler" verb="*" path="SampleHandler.new"

Modules="IsapiModule"

criptProcessor="FrameworkPath\aspnet_isapi.dll"

resourceType="File" />

lt;/system.webServer>

lt;/configuration>

To register an HTTP handler for IIS 7.0 running in Integrated Mode

<configuration>

lt;system.webServer>

lt;handlers>

lt;add name="SampleHandler" verb="*"

ath="SampleHandler.new"

type="SampleHandler, SampleHandlerAssembly"

resourceType="Unspecified" />

lt;/handlers>

lt;system.webServer>

lt;/configuration>

HTTP Module To register the module for IIS 6.0 and IIS 7.0 running in Classic mode

<configuration>

lt;system.web>

lt;httpModules>

lt;add name="HelloWorldModule" type="HelloWorldModule"/>

lt;/httpModules>

lt;/system.web>

lt;/configuration>

To register the module for IIS 7.0 running in Integrated mode

<configuration>

lt;system.webServer>

lt;modules>

lt;add name="HelloWorldModule" type="HelloWorldModule"/>

lt;/modules>

lt;/system.webServer>

lt;/configuration>

http://msdn.microsoft.com/en-us/library/ms227673%28v=VS.100%29.aspx

http://msdn.microsoft.com/en-us/library/46c5ddfy.aspx

上一篇:linuxsvn安装和配置,不结合apache
下一篇:Ubuntu16.04无法修改固定屏幕分辨率的解决方法(Linux小白操作)