Tag: asp.net asp.net mvc

RedirectToRoute应该如何使用?

我在我的Global.asax.cs中有这个: routes.MapRoute("BetaAccess", "beta-access", new { controller = "Beta", action = "Index" }); 而这在我的控制器(HomeController的索引操作),它肯定是越来越热门: RedirectToRoute("BetaAccess"); 但是,仍然没有redirect发生…它只是去正常的主页。 我用错了吗? 另外,我可以做Response.Redirect(“〜/ beta-access”)并进入beta页面。

ASP.NET MVC和httpRuntime executionTimeout

我想增加一个ASP.NET MVC应用程序的一个小节的httpRuntime executionTimeout 。 在一个普通的Web应用程序中,您可以使用: <configuration> <location path="UploadPage.aspx"> <httpRuntime executionTimeout="600"/> </location> </configuration> 但是,在ASP.NET MVC中确实没有“文件夹”的概念,那么我该如何去做呢? 让我们假设ASP.NET MVCpath是/Images/Upload与一个ImagesController和上传行动。