我有一个 asp.net 4 网站,在 IIS7.5(Windows 7)和经典应用程序池(尽管是 .NET 4)下本地工作正常。
某些站点使用路由,而站点的某些较旧部分则不使用路由。无论如何,在本地一切正常。
自从介绍站点的路由部分以来,我刚刚将其首次部署到我们的实时网络服务器上,而我得到的只是站点中使用路由的部分的 404。
实时网络服务器是 Windows 2008 上的 IIS7,并且再次设置为使用 .NET4 经典应用程序池。
我尝试在 web.config 的 system.webserver 部分下添加
,但这似乎没有任何区别。
任何人都可以阐明问题可能是什么/如何解决这个问题吗?
I have an asp.net 4 website that is working fine locally under IIS7.5 (windows 7), and under the Classic Application Pool (albeit .NET 4).
Some of the site uses routing and some of the older sections of the site don't. Anyway, it all works fine locally.
I have just deployed this to our live webserver for the first time since introducing the routing parts of the site, and all I get is 404's for the sections of the site that are using Routing.
The live webserver is IIS7 on Windows 2008, and again is set to use a .NET4 Classic App Pool.
I have tried adding <modules runAllManagedModulesForAllRequests="true">
under the system.webserver section of my web.config, but this doesn't appear to have made any difference.
Can anyone shed some light on what the problem might be/how to get around this please?
发布评论
评论(2)
我想我不久前通过再次运行
aspnet_regiis
(在 .Net Framework v4 文件夹中)解决了这个问题。I think I fixed this problem a while ago by running
aspnet_regiis
again (in the .Net Framework v4 folder).不幸的是,我能够解决这个问题的唯一方法是按照本文在 IIS7 中添加通配符脚本映射:
http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/
这至少得到了页面路由成功了,即使确实感觉有点脏。
The only way I've been able to get around this unfortunately is by adding a wildcard script mapping in IIS7 as per this article:
http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/
This has at least got the pages routing successfully, even if it does feel a little dirty.