在IIS 7和ASP.NET MVC诊断404错误 [英] Diagnosing 404 errors on IIS 7 and ASP.NET MVC

查看:178
本文介绍了在IIS 7和ASP.NET MVC诊断404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC应用程序开发和测试的卡西尼。部署到我的GoDaddy的网站,默认页上来罚款。点击登录,我收到了404。

I have an mvc app developed and tested with Cassini. Deployed to my site on GoDaddy, and the default page comes up fine. Click to log in, and I get a 404.

我在IIS 7中下运行,所以这是始料未及的。我是航线pretty平原:

I'm running under IIS 7 there, so this is unexpected. My routes are pretty plain:

        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default",                                              
            "{controller}/{action}/{id}",                           
            new { controller = "Public", action = "Index", id = "" } 
        );
        routes.MapRoute(
            "Report1",
            "Report/{action}/{start}/{end}",
            new { controller = "Report", action = "Index" }
        );
        routes.MapRoute(
            "Report2",
            "Report/{action}/{start}/{end}/{idList}",
            new { controller = "Report", action = "Index" }
        );

任何想法可能什么或者我该如何解决这个?

Any idea what might be going on or how I can troubleshoot this?

推荐答案

您在IIS7运行的集成模式

IIS7的经典模式确实的不可以自动扩展名URL映射到ASP.NET(像IIS6)

Classic mode of IIS7 does not automatically map extensionless URLs to ASP.NET (much like IIS6).

另外,还要确保你的的Web.config < system.webServer方式> 标记的配置是否正确。

Also make sure your Web.config <system.webServer> tag is configured correctly.

这篇关于在IIS 7和ASP.NET MVC诊断404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆