我已经继承了ASP.NET MVC 3应用程序。我对MVC 3一无所知。我已经使用了ASP.NET Web Forms 5年以上。当我尝试从Visual Studio启动应用程序时,我收到404。浏览器指向http://localhost/Account/Logon。我注意到,在我的项目,有:ASP.NET MVC 3 - 404当启动应用程序
- /Controllers/AccountController.cs
- /Views/Account/LogOn.cshtml
我假定这就是应该启动.I've在Global.asax.cs中设置断点,发现我正在通过以下事件重定向到这个页面:
void WSFederationAuthenticationModule_AuthorizationFailed(object sender, AuthorizationFailedEventArgs e)
{
e.RedirectToIdentityProvider = false;
HttpContext.Response.Redirect("/Account/Logon");
}
当我启动应用程序,我得到一个404,我完全失去了问候如何解决这个问题。我也不知道如何在MVC世界中“设置为起始页”。有人能帮我克服这个障碍吗?我只想运行该应用程序。非常感谢你!
这可能是一个愚蠢的问题,但你已经安装在你的开发MVC3做框? – simonlchilds
从头开始,如果没有,您可能无法构建应用程序。看,告诉你这是愚蠢的! – simonlchilds
这里是我找到我的答案:http://stackoverflow.com/questions/3877339/asp-net-mvc-beta-authorize-attribute-sends-me-to-wrong-action –