欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

ApplicationHost.config(IIS存储配置区文件)介绍

程序员文章站 2022-06-27 18:46:52
对于一个刚刚创建网站,以asp.net mvc5为例。我们并没有在网页的配置文件(web.config)中配置一些处理程序或模块,如处理session的sessionstatemodule模块,映射u...

对于一个刚刚创建网站,以asp.net mvc5为例。

我们并没有在网页的配置文件(web.config)中配置一些处理程序或模块,如处理session的sessionstatemodule模块,映射url的urlroutingmodule模块等。

但是我们依然可以在控制器中正常的访问session。我们请求的url依然能正确的映射到控制器和action。

这是因为在iis的配置文件中applicationhost.config的modules 元素中注册了很多模块 ,这些模块供iis承载的所有应用程序使用。

在 applicationhost.config 文件中注册的模块具有全局范围,因为它们为所有由 iis 承载的 web 应用程序而注册。

同样,在 applicationhost.config 文件的 globalmodules 元素中定义的本机代码模块也具有全局范围。如果 web 应用程序不需要全局模块,则可以将其禁用。

当然这也只是这个配置文件的功能的一小部分,有时我们在iis管理器中添加的映射关系等也都会存储在这个配置文件中。

但是没有十足的把握,不要修改这个配置文件或在修改前进行备份。因为这个文件供整个iis承载的所有应用程序使用。一些不起眼的配置节点的丢失,对某些程序可能就是致命的。

下面我们列出这个配置文件的部分内容,大家也可以再自己的电脑c盘中搜索这个文件,详细的查看其中的内容。

<!--

the <globalmodules> section defines all native-code modules.
to enable a module, specify it in the <modules> section.

-->
<globalmodules>
<add name="uricachemodule" image="%iis_bin%\cachuri.dll" />
<!-- <add name="filecachemodule" image="%iis_bin%\cachfile.dll" /> -->
<add name="tokencachemodule" image="%iis_bin%\cachtokn.dll" />
<!-- <add name="httpcachemodule" image="%iis_bin%\cachhttp.dll" /> -->
<add name="dynamiccompressionmodule" image="%iis_bin%\compdyn.dll" />
<add name="staticcompressionmodule" image="%iis_bin%\compstat.dll" />
<add name="defaultdocumentmodule" image="%iis_bin%\defdoc.dll" />
<add name="directorylistingmodule" image="%iis_bin%\dirlist.dll" />
<add name="protocolsupportmodule" image="%iis_bin%\protsup.dll" />
<add name="httpredirectionmodule" image="%iis_bin%\redirect.dll" />
<add name="serversideincludemodule" image="%iis_bin%\iis_ssi.dll" />
<add name="staticfilemodule" image="%iis_bin%\static.dll" />
<add name="anonymousauthenticationmodule" image="%iis_bin%\authanon.dll" />
<add name="certificatemappingauthenticationmodule" image="%iis_bin%\authcert.dll" />
<add name="urlauthorizationmodule" image="%iis_bin%\urlauthz.dll" />
<add name="basicauthenticationmodule" image="%iis_bin%\authbas.dll" />
<add name="windowsauthenticationmodule" image="%iis_bin%\authsspi.dll" />
<!-- <add name="digestauthenticationmodule" image="%iis_bin%\authmd5.dll" /> -->
<add name="iiscertificatemappingauthenticationmodule" image="%iis_bin%\authmap.dll" />
<add name="iprestrictionmodule" image="%iis_bin%\iprestr.dll" />
<add name="dynamiciprestrictionmodule" image="%iis_bin%\diprestr.dll" />
<add name="requestfilteringmodule" image="%iis_bin%\modrqflt.dll" />
<add name="customloggingmodule" image="%iis_bin%\logcust.dll" />
<add name="customerrormodule" image="%iis_bin%\custerr.dll" />
<add name="httploggingmodule" image="%iis_bin%\loghttp.dll" />
<!-- <add name="tracingmodule" image="%iis_bin%\iisetw.dll" /> -->
<add name="failedrequeststracingmodule" image="%iis_bin%\iisfreb.dll" />
<add name="requestmonitormodule" image="%iis_bin%\iisreqs.dll" />
<add name="isapimodule" image="%iis_bin%\isapi.dll" />
<add name="isapifiltermodule" image="%iis_bin%\filter.dll" />
<add name="cgimodule" image="%iis_bin%\cgi.dll" />
<add name="fastcgimodule" image="%iis_bin%\iisfcgi.dll" />
<!-- <add name="webdavmodule" image="%iis_bin%\webdav.dll" /> -->
<add name="rewritemodule" image="%iis_bin%\rewrite.dll" />
<add name="configurationvalidationmodule" image="%iis_bin%\validcfg.dll" />
<add name="applicationinitializationmodule" image="%iis_bin%\warmup.dll" />
<add name="websocketmodule" image="%iis_bin%\iiswsock.dll" />
<add name="webmatrixsupportmodule" image="%iis_bin%\webmatrixsup.dll" />
<add name="managedengine" image="%windir%\microsoft.net\framework\v2.0.50727\webengine.dll" precondition="integratedmode,runtimeversionv2.0,bitness32" />
<add name="managedengine64" image="%windir%\microsoft.net\framework64\v2.0.50727\webengine.dll" precondition="integratedmode,runtimeversionv2.0,bitness64" />
<add name="managedenginev4.0_32bit" image="%windir%\microsoft.net\framework\v4.0.30319\webengine4.dll" precondition="integratedmode,runtimeversionv4.0,bitness32" />
<add name="managedenginev4.0_64bit" image="%windir%\microsoft.net\framework64\v4.0.30319\webengine4.dll" precondition="integratedmode,runtimeversionv4.0,bitness64" />
</globalmodules>

上面的配置节点中列出的都是本机代码模块(native-code)。大家如果要添加自己的托管代码模块(managed-code),就添加早modules中。

然后通过环境变量去读取这些文件。他们是整个iis的基石。

<modules>
<!--
<add name="httpcachemodule" lockitem="true" />
-->
<add name="dynamiccompressionmodule" lockitem="true" />
<add name="staticcompressionmodule" lockitem="true" />
<add name="defaultdocumentmodule" lockitem="true" />
<add name="directorylistingmodule" lockitem="true" />
<add name="isapifiltermodule" lockitem="true" />
<add name="protocolsupportmodule" lockitem="true" />
<add name="httpredirectionmodule" lockitem="true" />
<add name="serversideincludemodule" lockitem="true" />
<add name="staticfilemodule" lockitem="true" />
<add name="anonymousauthenticationmodule" lockitem="true" />
<add name="certificatemappingauthenticationmodule" lockitem="true" />
<add name="urlauthorizationmodule" lockitem="true" />
<add name="basicauthenticationmodule" lockitem="true" />
<add name="windowsauthenticationmodule" lockitem="true" />
<!--
<add name="digestauthenticationmodule" lockitem="true" />
-->
<add name="iiscertificatemappingauthenticationmodule" lockitem="true" />
<add name="webmatrixsupportmodule" lockitem="true" />
<add name="iprestrictionmodule" lockitem="true" />
<add name="dynamiciprestrictionmodule" lockitem="true" />
<add name="requestfilteringmodule" lockitem="true" />
<add name="customloggingmodule" lockitem="true" />
<add name="customerrormodule" lockitem="true" />
<add name="isapimodule" lockitem="true" />
<add name="httploggingmodule" lockitem="true" />
<add name="failedrequeststracingmodule" lockitem="true" />
<add name="cgimodule" lockitem="true" />
<add name="fastcgimodule" lockitem="true" />
<!-- <add name="webdavmodule" /> -->
<add name="rewritemodule" />
<add name="outputcache" type="system.web.caching.outputcachemodule" precondition="managedhandler" />
<add name="session" type="system.web.sessionstate.sessionstatemodule" precondition="managedhandler" />
<add name="windowsauthentication" type="system.web.security.windowsauthenticationmodule" precondition="managedhandler" />
<add name="formsauthentication" type="system.web.security.formsauthenticationmodule" precondition="managedhandler" />
<add name="defaultauthentication" type="system.web.security.defaultauthenticationmodule" precondition="managedhandler" />
<add name="rolemanager" type="system.web.security.rolemanagermodule" precondition="managedhandler" />
<add name="urlauthorization" type="system.web.security.urlauthorizationmodule" precondition="managedhandler" />
<add name="fileauthorization" type="system.web.security.fileauthorizationmodule" precondition="managedhandler" />
<add name="anonymousidentification" type="system.web.security.anonymousidentificationmodule" precondition="managedhandler" />
<add name="profile" type="system.web.profile.profilemodule" precondition="managedhandler" />
<add name="urlmappingsmodule" type="system.web.urlmappingsmodule" precondition="managedhandler" />
<add name="applicationinitializationmodule" lockitem="true" />
<add name="websocketmodule" lockitem="true" />
<add name="servicemodel-4.0" type="system.servicemodel.activation.servicehttpmodule,system.servicemodel.activation,version=4.0.0.0,culture=neutral,publickeytoken=31bf3856ad364e35" precondition="managedhandler,runtimeversionv4.0" />
<add name="configurationvalidationmodule" lockitem="true" />
<add name="urlroutingmodule-4.0" type="system.web.routing.urlroutingmodule" precondition="managedhandler,runtimeversionv4.0" />
<add name="scriptmodule-4.0" type="system.web.handlers.scriptmodule, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="managedhandler,runtimeversionv4.0" />
<add name="servicemodel" type="system.servicemodel.activation.httpmodule, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="managedhandler,runtimeversionv2.0" />
</modules>

ApplicationHost.config(IIS存储配置区文件)介绍

<handlers accesspolicy="read, script">
<!-- <add name="webdav" path="*" verb="propfind,proppatch,mkcol,put,copy,delete,move,lock,unlock" modules="webdavmodule" resourcetype="unspecified" requireaccess="none" /> -->
<add name="axd-isapi-4.0_64bit" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-4.0_64bit" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-4.0_64bit" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-4.0_64bit" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-4.0_64bit" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-4.0_64bit" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="svc-isapi-4.0_64bit" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="rules-isapi-4.0_64bit" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="xoml-isapi-4.0_64bit" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="xamlx-isapi-4.0_64bit" path="*.xamlx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="aspq-isapi-4.0_64bit" path="*.aspq" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="cshtm-isapi-4.0_64bit" path="*.cshtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="cshtml-isapi-4.0_64bit" path="*.cshtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="vbhtm-isapi-4.0_64bit" path="*.vbhtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="vbhtml-isapi-4.0_64bit" path="*.vbhtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="svc-integrated" path="*.svc" verb="*" type="system.servicemodel.activation.httphandler, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="svc-isapi-2.0" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" />
<add name="xoml-integrated" path="*.xoml" verb="*" type="system.servicemodel.activation.httphandler, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="xoml-isapi-2.0" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" />
<add name="rules-integrated" path="*.rules" verb="*" type="system.servicemodel.activation.httphandler, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="rules-isapi-2.0" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" />
<add name="axd-isapi-4.0_32bit" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-4.0_32bit" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-4.0_32bit" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-4.0_32bit" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-4.0_32bit" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-4.0_32bit" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="svc-isapi-4.0_32bit" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="rules-isapi-4.0_32bit" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="xoml-isapi-4.0_32bit" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="xamlx-isapi-4.0_32bit" path="*.xamlx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="aspq-isapi-4.0_32bit" path="*.aspq" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="cshtm-isapi-4.0_32bit" path="*.cshtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="cshtml-isapi-4.0_32bit" path="*.cshtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="vbhtm-isapi-4.0_32bit" path="*.vbhtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="vbhtml-isapi-4.0_32bit" path="*.vbhtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="tracehandler-integrated-4.0" path="trace.axd" verb="get,head,post,debug" type="system.web.handlers.tracehandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="webadminhandler-integrated-4.0" path="webadmin.axd" verb="get,debug" type="system.web.handlers.webadminhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="assemblyresourceloader-integrated-4.0" path="webresource.axd" verb="get,debug" type="system.web.handlers.assemblyresourceloader" precondition="integratedmode,runtimeversionv4.0" />
<add name="pagehandlerfactory-integrated-4.0" path="*.aspx" verb="get,head,post,debug" type="system.web.ui.pagehandlerfactory" precondition="integratedmode,runtimeversionv4.0" />
<add name="simplehandlerfactory-integrated-4.0" path="*.ashx" verb="get,head,post,debug" type="system.web.ui.simplehandlerfactory" precondition="integratedmode,runtimeversionv4.0" />
<add name="webservicehandlerfactory-integrated-4.0" path="*.asmx" verb="get,head,post,debug" type="system.web.script.services.scripthandlerfactory, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="httpremotinghandlerfactory-rem-integrated-4.0" path="*.rem" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory, system.runtime.remoting, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv4.0" />
<add name="httpremotinghandlerfactory-soap-integrated-4.0" path="*.soap" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory, system.runtime.remoting, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv4.0" />
<add name="svc-integrated-4.0" path="*.svc" verb="*" type="system.servicemodel.activation.servicehttphandlerfactory, system.servicemodel.activation, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="rules-integrated-4.0" path="*.rules" verb="*" type="system.servicemodel.activation.servicehttphandlerfactory, system.servicemodel.activation, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="xoml-integrated-4.0" path="*.xoml" verb="*" type="system.servicemodel.activation.servicehttphandlerfactory, system.servicemodel.activation, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="xamlx-integrated-4.0" path="*.xamlx" verb="get,head,post,debug" type="system.xaml.hosting.xamlhttphandlerfactory, system.xaml.hosting, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="aspq-integrated-4.0" path="*.aspq" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="cshtm-integrated-4.0" path="*.cshtm" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="cshtml-integrated-4.0" path="*.cshtml" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="vbhtm-integrated-4.0" path="*.vbhtm" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="vbhtml-integrated-4.0" path="*.vbhtml" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="scripthandlerfactoryappservices-integrated-4.0" path="*_appservice.axd" verb="*" type="system.web.script.services.scripthandlerfactory, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="scriptresourceintegrated-4.0" path="*scriptresource.axd" verb="get,head" type="system.web.handlers.scriptresourcehandler, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="aspclassic" path="*.asp" verb="get,head,post" modules="isapimodule" scriptprocessor="%iis_bin%\asp.dll" resourcetype="file" />
<add name="securitycertificate" path="*.cer" verb="get,head,post" modules="isapimodule" scriptprocessor="%iis_bin%\asp.dll" resourcetype="file" />
<add name="isapi-dll" path="*.dll" verb="*" modules="isapimodule" resourcetype="file" requireaccess="execute" allowpathinfo="true" />
<add name="tracehandler-integrated" path="trace.axd" verb="get,head,post,debug" type="system.web.handlers.tracehandler" precondition="integratedmode,runtimeversionv2.0" />
<add name="webadminhandler-integrated" path="webadmin.axd" verb="get,debug" type="system.web.handlers.webadminhandler" precondition="integratedmode,runtimeversionv2.0" />
<add name="assemblyresourceloader-integrated" path="webresource.axd" verb="get,debug" type="system.web.handlers.assemblyresourceloader" precondition="integratedmode,runtimeversionv2.0" />
<add name="pagehandlerfactory-integrated" path="*.aspx" verb="get,head,post,debug" type="system.web.ui.pagehandlerfactory" precondition="integratedmode,runtimeversionv2.0" />
<add name="simplehandlerfactory-integrated" path="*.ashx" verb="get,head,post,debug" type="system.web.ui.simplehandlerfactory" precondition="integratedmode,runtimeversionv2.0" />
<add name="webservicehandlerfactory-integrated" path="*.asmx" verb="get,head,post,debug" type="system.web.services.protocols.webservicehandlerfactory,system.web.services,version=2.0.0.0,culture=neutral,publickeytoken=b03f5f7f11d50a3a" precondition="integratedmode,runtimeversionv2.0" />
<add name="httpremotinghandlerfactory-rem-integrated" path="*.rem" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory,system.runtime.remoting,version=2.0.0.0,culture=neutral,publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="httpremotinghandlerfactory-soap-integrated" path="*.soap" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory,system.runtime.remoting,version=2.0.0.0,culture=neutral,publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="axd-isapi-2.0" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-2.0" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-2.0" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-2.0" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-2.0" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-2.0" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="svc-isapi-2.0-64" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" />
<add name="axd-isapi-2.0-64" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-2.0-64" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-2.0-64" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-2.0-64" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-2.0-64" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-2.0-64" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="rules-64-isapi-2.0" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" />
<add name="xoml-64-isapi-2.0" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" />
<add name="cgi-exe" path="*.exe" verb="*" modules="cgimodule" resourcetype="file" requireaccess="execute" allowpathinfo="true" />
<add name="ssinc-stm" path="*.stm" verb="get,head,post" modules="serversideincludemodule" resourcetype="file" />
<add name="ssinc-shtm" path="*.shtm" verb="get,head,post" modules="serversideincludemodule" resourcetype="file" />
<add name="ssinc-shtml" path="*.shtml" verb="get,head,post" modules="serversideincludemodule" resourcetype="file" />
<add name="traceverbhandler" path="*" verb="trace" modules="protocolsupportmodule" requireaccess="none" />
<add name="optionsverbhandler" path="*" verb="options" modules="protocolsupportmodule" requireaccess="none" />
<add name="extensionlessurl-isapi-4.0_32bit" path="*." verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="extensionlessurlhandler-isapi-4.0_64bit" path="*." verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="extensionlessurl-integrated-4.0" path="*." verb="get,head,post,debug" type="system.web.handlers.transferrequesthandler" precondition="integratedmode,runtimeversionv4.0" responsebufferlimit="0" />
<add name="staticfile" path="*" verb="*" modules="staticfilemodule,defaultdocumentmodule,directorylistingmodule" resourcetype="either" requireaccess="read" />
</handlers>

ApplicationHost.config(IIS存储配置区文件)介绍

上面的配置节点中,列出的既有本机代码模块(native-code),也有托管代码模块(managed-code)。

<handlers accesspolicy="read, script">
<!-- <add name="webdav" path="*" verb="propfind,proppatch,mkcol,put,copy,delete,move,lock,unlock" modules="webdavmodule" resourcetype="unspecified" requireaccess="none" /> -->
<add name="axd-isapi-4.0_64bit" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-4.0_64bit" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-4.0_64bit" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-4.0_64bit" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-4.0_64bit" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-4.0_64bit" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="svc-isapi-4.0_64bit" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="rules-isapi-4.0_64bit" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="xoml-isapi-4.0_64bit" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="xamlx-isapi-4.0_64bit" path="*.xamlx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" />
<add name="aspq-isapi-4.0_64bit" path="*.aspq" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="cshtm-isapi-4.0_64bit" path="*.cshtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="cshtml-isapi-4.0_64bit" path="*.cshtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="vbhtm-isapi-4.0_64bit" path="*.vbhtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="vbhtml-isapi-4.0_64bit" path="*.vbhtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="svc-integrated" path="*.svc" verb="*" type="system.servicemodel.activation.httphandler, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="svc-isapi-2.0" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" />
<add name="xoml-integrated" path="*.xoml" verb="*" type="system.servicemodel.activation.httphandler, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="xoml-isapi-2.0" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" />
<add name="rules-integrated" path="*.rules" verb="*" type="system.servicemodel.activation.httphandler, system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="rules-isapi-2.0" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" />
<add name="axd-isapi-4.0_32bit" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-4.0_32bit" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-4.0_32bit" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-4.0_32bit" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-4.0_32bit" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-4.0_32bit" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="svc-isapi-4.0_32bit" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="rules-isapi-4.0_32bit" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="xoml-isapi-4.0_32bit" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="xamlx-isapi-4.0_32bit" path="*.xamlx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" />
<add name="aspq-isapi-4.0_32bit" path="*.aspq" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="cshtm-isapi-4.0_32bit" path="*.cshtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="cshtml-isapi-4.0_32bit" path="*.cshtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="vbhtm-isapi-4.0_32bit" path="*.vbhtm" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="vbhtml-isapi-4.0_32bit" path="*.vbhtml" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="tracehandler-integrated-4.0" path="trace.axd" verb="get,head,post,debug" type="system.web.handlers.tracehandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="webadminhandler-integrated-4.0" path="webadmin.axd" verb="get,debug" type="system.web.handlers.webadminhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="assemblyresourceloader-integrated-4.0" path="webresource.axd" verb="get,debug" type="system.web.handlers.assemblyresourceloader" precondition="integratedmode,runtimeversionv4.0" />
<add name="pagehandlerfactory-integrated-4.0" path="*.aspx" verb="get,head,post,debug" type="system.web.ui.pagehandlerfactory" precondition="integratedmode,runtimeversionv4.0" />
<add name="simplehandlerfactory-integrated-4.0" path="*.ashx" verb="get,head,post,debug" type="system.web.ui.simplehandlerfactory" precondition="integratedmode,runtimeversionv4.0" />
<add name="webservicehandlerfactory-integrated-4.0" path="*.asmx" verb="get,head,post,debug" type="system.web.script.services.scripthandlerfactory, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="httpremotinghandlerfactory-rem-integrated-4.0" path="*.rem" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory, system.runtime.remoting, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv4.0" />
<add name="httpremotinghandlerfactory-soap-integrated-4.0" path="*.soap" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory, system.runtime.remoting, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv4.0" />
<add name="svc-integrated-4.0" path="*.svc" verb="*" type="system.servicemodel.activation.servicehttphandlerfactory, system.servicemodel.activation, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="rules-integrated-4.0" path="*.rules" verb="*" type="system.servicemodel.activation.servicehttphandlerfactory, system.servicemodel.activation, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="xoml-integrated-4.0" path="*.xoml" verb="*" type="system.servicemodel.activation.servicehttphandlerfactory, system.servicemodel.activation, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="xamlx-integrated-4.0" path="*.xamlx" verb="get,head,post,debug" type="system.xaml.hosting.xamlhttphandlerfactory, system.xaml.hosting, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="aspq-integrated-4.0" path="*.aspq" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="cshtm-integrated-4.0" path="*.cshtm" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="cshtml-integrated-4.0" path="*.cshtml" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="vbhtm-integrated-4.0" path="*.vbhtm" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="vbhtml-integrated-4.0" path="*.vbhtml" verb="get,head,post,debug" type="system.web.httpforbiddenhandler" precondition="integratedmode,runtimeversionv4.0" />
<add name="scripthandlerfactoryappservices-integrated-4.0" path="*_appservice.axd" verb="*" type="system.web.script.services.scripthandlerfactory, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="scriptresourceintegrated-4.0" path="*scriptresource.axd" verb="get,head" type="system.web.handlers.scriptresourcehandler, system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" precondition="integratedmode,runtimeversionv4.0" />
<add name="aspclassic" path="*.asp" verb="get,head,post" modules="isapimodule" scriptprocessor="%iis_bin%\asp.dll" resourcetype="file" />
<add name="securitycertificate" path="*.cer" verb="get,head,post" modules="isapimodule" scriptprocessor="%iis_bin%\asp.dll" resourcetype="file" />
<add name="isapi-dll" path="*.dll" verb="*" modules="isapimodule" resourcetype="file" requireaccess="execute" allowpathinfo="true" />
<add name="tracehandler-integrated" path="trace.axd" verb="get,head,post,debug" type="system.web.handlers.tracehandler" precondition="integratedmode,runtimeversionv2.0" />
<add name="webadminhandler-integrated" path="webadmin.axd" verb="get,debug" type="system.web.handlers.webadminhandler" precondition="integratedmode,runtimeversionv2.0" />
<add name="assemblyresourceloader-integrated" path="webresource.axd" verb="get,debug" type="system.web.handlers.assemblyresourceloader" precondition="integratedmode,runtimeversionv2.0" />
<add name="pagehandlerfactory-integrated" path="*.aspx" verb="get,head,post,debug" type="system.web.ui.pagehandlerfactory" precondition="integratedmode,runtimeversionv2.0" />
<add name="simplehandlerfactory-integrated" path="*.ashx" verb="get,head,post,debug" type="system.web.ui.simplehandlerfactory" precondition="integratedmode,runtimeversionv2.0" />
<add name="webservicehandlerfactory-integrated" path="*.asmx" verb="get,head,post,debug" type="system.web.services.protocols.webservicehandlerfactory,system.web.services,version=2.0.0.0,culture=neutral,publickeytoken=b03f5f7f11d50a3a" precondition="integratedmode,runtimeversionv2.0" />
<add name="httpremotinghandlerfactory-rem-integrated" path="*.rem" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory,system.runtime.remoting,version=2.0.0.0,culture=neutral,publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="httpremotinghandlerfactory-soap-integrated" path="*.soap" verb="get,head,post,debug" type="system.runtime.remoting.channels.http.httpremotinghandlerfactory,system.runtime.remoting,version=2.0.0.0,culture=neutral,publickeytoken=b77a5c561934e089" precondition="integratedmode,runtimeversionv2.0" />
<add name="axd-isapi-2.0" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-2.0" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-2.0" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-2.0" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-2.0" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-2.0" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness32" responsebufferlimit="0" />
<add name="svc-isapi-2.0-64" path="*.svc" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" />
<add name="axd-isapi-2.0-64" path="*.axd" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="pagehandlerfactory-isapi-2.0-64" path="*.aspx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="simplehandlerfactory-isapi-2.0-64" path="*.ashx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="webservicehandlerfactory-isapi-2.0-64" path="*.asmx" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-rem-isapi-2.0-64" path="*.rem" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="httpremotinghandlerfactory-soap-isapi-2.0-64" path="*.soap" verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" responsebufferlimit="0" />
<add name="rules-64-isapi-2.0" path="*.rules" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" />
<add name="xoml-64-isapi-2.0" path="*.xoml" verb="*" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll" precondition="classicmode,runtimeversionv2.0,bitness64" />
<add name="cgi-exe" path="*.exe" verb="*" modules="cgimodule" resourcetype="file" requireaccess="execute" allowpathinfo="true" />
<add name="ssinc-stm" path="*.stm" verb="get,head,post" modules="serversideincludemodule" resourcetype="file" />
<add name="ssinc-shtm" path="*.shtm" verb="get,head,post" modules="serversideincludemodule" resourcetype="file" />
<add name="ssinc-shtml" path="*.shtml" verb="get,head,post" modules="serversideincludemodule" resourcetype="file" />
<add name="traceverbhandler" path="*" verb="trace" modules="protocolsupportmodule" requireaccess="none" />
<add name="optionsverbhandler" path="*" verb="options" modules="protocolsupportmodule" requireaccess="none" />
<add name="extensionlessurl-isapi-4.0_32bit" path="*." verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0" />
<add name="extensionlessurlhandler-isapi-4.0_64bit" path="*." verb="get,head,post,debug" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0" />
<add name="extensionlessurl-integrated-4.0" path="*." verb="get,head,post,debug" type="system.web.handlers.transferrequesthandler" precondition="integratedmode,runtimeversionv4.0" responsebufferlimit="0" />
<add name="staticfile" path="*" verb="*" modules="staticfilemodule,defaultdocumentmodule,directorylistingmodule" resourcetype="either" requireaccess="read" />
</handlers>

上面可以看出,我们在iis管理器中看到的模块等配置信息就是来自这里,包括下面的处理程序映射,大家在iis里点击处理程序映射,其中显示的处理程序正式本配置文件

上面的处理程序是iis默认配置的,可以看出,iis为了能在多种环境下运行(包括不同的.net framework版本,不同的cpu版本),以处理 *.aspx 为例,来分析一下这种设置。

ApplicationHost.config(IIS存储配置区文件)介绍

在集成模式下,只对运行时版本进行了区分,因为托管代码会被编译为中间语言,中间语言在使用了时会根据运行机器的cpu型号编译为本地代码(nativa-code)。所以不需要有bitness64这样的配置。

在经典模式下,asp.net只是作为iis的一个isapi的扩展,而且不同的framework版本和运行时版本已经编译好具体的aspnet_isapi.dll,所以使用时只需根据具体的运行机器的情况选择对应的dll即可。

iis配置存储区中的文件供整个iis支持的应用程序使用,对不同的本地环境做了适配,没有十足的把握和了解,尽量不要修改这个文件。

相关标签: ApplicationHost.config