2013-03-14 18 views
1

我部署了一個帶有razor視圖的MVC Web應用程序給godaddy.com。我的應用程序在localhost上工作正常,但是在部署之後,當我鍵入域名時,它無法路由到我的主頁。我在Global.axcs文件中註冊了以下路由。ASP.Net MVC應用程序無法在服務器上找到主頁索引頁面

 routes.MapRoute(
      "Default", // Route name 
      "{controller}/{action}/{id}", // URL with parameters 
      new { controller = "HomePage", action = "Index", id = UrlParameter.Optional } // Parameter defaults 
     ); 

Godaddy的技術支持要求我在根中添加一個index.html文件。我添加了一個並在Global中評論默認路由。它會加載index.html。但我真的想顯示我的/首頁/索引

有誰知道爲什麼發生這種情況,並有任何建議?

+0

您是否收到404錯誤? – Shyju 2013-03-14 15:12:27

回答

相關問題