简体   繁体   English

在IIS7(Win2008)下返回404的URL路由(ASP.NET 4 Web窗体)在IIS7.5(Win7)下返回404?

[英]Url Routing (ASP.NET 4 Web Forms) returning 404 under IIS7 (Win2008) but OK under IIS7.5 (Win7)?

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). 我有一个asp.net 4网站,该网站在IIS7.5(Windows 7)和经典应用程序池(尽管.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. 自介绍网站的路由部分以来,我第一次将其部署到我们的实时Web服务器中,而我所获得的只是使用路由的网站部分的404。

The live webserver is IIS7 on Windows 2008, and again is set to use a .NET4 Classic App Pool. 实时网络服务器是Windows 2008上的IIS7,并且再次设置为使用.NET4经典应用程序池。

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. 我尝试在我的web.config的system.webserver部分下添加<modules runAllManagedModulesForAllRequests="true"> ,但这似乎没有任何区别。

Can anyone shed some light on what the problem might be/how to get around this please? 任何人都可以阐明问题可能在哪里/如何解决这个问题?

我想我通过再次运行aspnet_regiis (在.Net Framework v4文件夹中)解决了此问题。

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: 不幸的是,我能够解决此问题的唯一方法是按照本文在IIS7中添加通配符脚本映射:

http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/ 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. 这至少使页面成功路由,即使确实感到有些脏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.NET成员资格API在Win2008服务器/ IIS7上不起作用 - ASP.NET Membership API not working on Win2008 server/IIS7 IIS7 / Win7 .Net 4.0中ASP.Net网站的运行时问题 - Runtime problems for ASP.Net website in IIS7/Win7 .Net 4.0 ASP.NET页将无法在Win7 x64上的IIS7上启动 - ASP.NET page will not start on IIS7 on Win7 x64 无法在Win7 64位上安装IIS7和ASP.NET 3.5 - Can't install IIS7 and ASP.NET 3.5 on Win7 64-bit ASP.NET网站(IIS 7.5,Win7)中的自定义HttpHandler出现错误500 - Error 500 with custom HttpHandler in ASP.NET website (IIS 7.5, Win7) 尝试在C#/ ASP.NET / IIS 7.5 / Win7环境中调用可执行的命令提示符 - Attempting to call command prompt execuable in a C# / ASP.NET / IIS 7.5 / Win7 Environment Azure ASP.NET MVC角色页面将无法在Win7 x64的IIS7上启动 - Azure ASP.NET MVC Role page will not start on IIS7 on Win7 x64 找不到网页 - HTTP 404,ASP.NET页面不能与IIS7.5一起使用 - Web Page Not Found - HTTP 404, ASP.NET page isn't working with IIS7.5 在Win7上的Visual Studio 2008中使用IIS6作为ASP.NET开发主机 - Using IIS6 as ASP.NET development host in Visual Studio 2008 on Win7 ASP.NET MVC 3,IIS7,404错误,无法正确路由? - ASP.NET MVC 3, IIS7, 404 Error, not routing correctly?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM