2016-04-03 13 views
0

Die Anwendung in der lokalen Umgebung läuft gut, aber wenn es auf die Live-Server zeigtIst es möglich, die Web Application mvc 4 (template 4.5.2) auf iis7 mit dem Dateisystem als Veröffentlichungsmethode seit 2015 zu veröffentlichen?

The resource cannot be found. 
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. 

Antwort

0

Ich löste das Problem veröffentlicht wird. Ja, es ist möglich.

Die Standardseite ist jedoch in web.config nicht definiert. Es muss in RouteConfig.cs im App_Start-Verzeichnis angegeben werden. Etwas wie folgt aus:

routes.MapRoute(
      name: "Default", 
      url: "{controller}/{action}/{id}", 
      defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional } 
     ); 

Wie Sie sehen können, der absolute Pfad ist ohne cshtml Erweiterung, so könnte wie in url Browser etwas gesetzt werden:

http://server:prort/Account/Login