1

我创建在VS 2012 Express中的互联网应用程序模板创建一个新的MVC 4项目后,默认文档,for details click hereASP.net MVC 4,如何保持路由项目发布

当我想出版,我:HTTP 403.14 - 禁止

我搜索了一个解决方案,发现它看起来像一个路由问题,其他帖子在stackoverflow通过修改MVC 3 global.asax指令给出答案。

当我试图相同的解决方案适用于MVC 4 global.asax中,我发现语法从那些MVC 3,的差异太​​大即RouteConfig.RegisterRoutes(RouteTable.Routes)

namespace MyMVC4 
{ 
    public class MvcApplication : System.Web.HttpApplication 
    { 
     protected void Application_Start() 
     { 
      AreaRegistration.RegisterAllAreas(); 

      WebApiConfig.Register(GlobalConfiguration.Configuration); 
      FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 
      RouteConfig.RegisterRoutes(RouteTable.Routes); 
      BundleConfig.RegisterBundles(BundleTable.Bundles); 
      AuthConfig.RegisterAuth(); 
      } 
     } 
    } 
+0

现在我正在寻找[在这个方向](http://stackoverflow.com/questions/2659544/cant -run-asp-net-mvc-2-web-app-on-iis-7-5),希望这会对我有所帮助。 –

回答

0

我的疑问是错误的,This is why it happens,解决方案是由Dommer here提供的,程序对于Visual Studio 2012是一样的。