Iis 7 IIS7:通配符映射和默认文档

Iis 7 IIS7:通配符映射和默认文档,iis-7,wildcard,Iis 7,Wildcard,我正在将IIS6网站迁移到IIS7,我遇到了一个众所周知的问题,即在使用默认文档时混合使用全局ASP.NET处理程序。详情请参见此处: 现在,在IIS7中,我配置了以下模块,其中所有模块都有一个global.asax重写大量查询 [... All default app modules ...] <add name="StaticFile" path="*.*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule

我正在将IIS6网站迁移到IIS7,我遇到了一个众所周知的问题,即在使用默认文档时混合使用全局ASP.NET处理程序。详情请参见此处:

现在,在IIS7中,我配置了以下模块,其中所有模块都有一个global.asax重写大量查询

[... All default app modules ...]
<add name="StaticFile" path="*.*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" allowPathInfo="false" preCondition="" />
<add name="Everything" path="*" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" />
使用此配置时,由于StaticFile通配符,默认文档无法工作。我的约束集类似于:

让Everything global.asax处理所有非静态请求以进行重写。 不要更改global.asax代码,因为它很复杂,我们稍后会整理它。 拥有现有目录的默认文档 不要事事都处理静态文件 使用IIS7集成模式 我目前的理解是,无法使用此设置。因此,一个折衷办法是将global.asax重写代码移动到IHttpModule中,在静态文件之后注册。遗憾的是,它需要一个单独的程序集,而不是直接编辑项目。我不知道卡西尼号会怎么样

你觉得怎么样?IHTTP模块是正确的方法吗?能简单点吗