URL路由在IIS 7.0应用程序池asp.net 2.0经典模式下无法工作



我已经在我的项目中实现了URL路由,我遵循以下文章:URL路由演示

这个URL路由演示在我的"IIS 7.0 with application pool asp.net 2.0 Integrated Mode"

但不工作(给出404错误),当我将其设置为"IIS 7.0与应用程序池asp.net 2.0经典模式"

我需要一个配置IIS 7.0的应用程序池配置为asp.net 2.0的经典模式。

请指定您的配置为上述项目工作(或路由工作)

谢谢…

在经典模式IIS7中,您基本上需要将此添加到配置中。查看这里获得更多信息(向下滚动到 IIS 7经典管道模式下的通配符脚本映射)。

<system.webServer>
    ...
    <handlers accessPolicy="Read, Script">
      ...
      <remove name="StaticFile" />
      <add name="ASP.NET-ISAPI-2.0-Wildcard"
         path="*" verb="GET,HEAD,POST,DEBUG"
         modules="IsapiModule"
         scriptProcessor="%windir%Microsoft.NETFrameworkv2.0.50727aspnet_isapi.dll"
         preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
      <add name="StaticFile" 
         path="*" verb="*" 
         modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" 
         resourceType="Either" requireAccess="Read" />
    </handlers>
    ...
</system.webServer>

最新更新