简体   繁体   中英

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).

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?

我想我通过再次运行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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM