诊断IIS 7和ASP.NET MVC上的404错误

我有一个开发和测试卡西尼的mvc应用程序.在GoDaddy上部署到我的网站,页面很好.点击登录,我得到一个404.

我在IIS 7下运行,所以这是意想不到的.我的路线很简单:

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}",action = "Index" }
        );

任何想法可能会发生什么或如何我可以解决这个问题?

解决方法

你在IIS7集成模式下运行吗?

IIS7的经典模式不会自动将扩展名URL映射到ASP.NET(非常像IIS6).

还要确保您的Web.config< system.webServer>标签配置正确.

相关文章

这篇文章主要讲解了“WPF如何实现带筛选功能的DataGrid”,文...
本篇内容介绍了“基于WPF如何实现3D画廊动画效果”的有关知识...
Some samples are below for ASP.Net web form controls:(fr...
问题描述: 对于未定义为 System.String 的列,唯一有效的值...
最近用到了CalendarExtender,结果不知道为什么发生了错位,...
ASP.NET 2.0 page lifecyle ASP.NET 2.0 event sequence cha...