Iis 7 生产环境中的ASP.NET路由

Iis 7 生产环境中的ASP.NET路由,iis-7,url-routing,asp.net-routing,Iis 7,Url Routing,Asp.net Routing,我已在RouteTable.Routes中注册了自定义asp.net路由 我的应用程序使用ASP.NET4.0路由系统,当我从VisualStudio运行网站进行调试时,在开发机器上一切都正常 当我将站点移动到IIS7时,导航到时路由不会发生 http://new.komplus.ua/home/services/viruses/antivirus/ 或者任何其他应该由路由系统处理的路径。结果,我从服务器上得到404错误 我确信我已将global.asax和/home/displayservi

我已在RouteTable.Routes中注册了自定义asp.net路由

我的应用程序使用ASP.NET4.0路由系统,当我从VisualStudio运行网站进行调试时,在开发机器上一切都正常

当我将站点移动到IIS7时,导航到时路由不会发生

http://new.komplus.ua/home/services/viruses/antivirus/
或者任何其他应该由路由系统处理的路径。结果,我从服务器上得到404错误

我确信我已将global.asax和/home/displayservice.aspx复制到web服务器,并在更新后重新启动了网站和应用程序池,但路由仍然没有发生

其他非路由页面,加载正常


与VS2010调试环境相比,为了使ASP.NET 4路由正常工作,是否必须对IIS进行任何特定配置

为了使ASP.NET 4.0路由在IIS7中工作,要求web.config清除webServer元素。例如:

<system.webServer>     
  <modules runAllManagedModulesForAllRequests="true">     
   </modules>     
</system.webServer> 
这不是Visual Studio环境中的要求,在该环境中,即使web.config中没有此指令,也会进行路由

<system.webServer>     
  <modules runAllManagedModulesForAllRequests="true">     
   </modules>     
</system.webServer>