2016-07-04 7 views
0

するように構成されたIIS私はオンライン私のウェブサイトを展開しようとしていますが、それはそれは、ローカルホストに取り組んでいるが8.5 Webサーバーがこのディレクトリの内容を一覧表示しませ

iis 8.5 The Web server is configured to not list the contents of this directory. 

私は、このエラーが発生します。私はクラウドストレージを使用するように私の雲の設定を行う場合にも、それが正常に動作します。しかし、私は何が問題であるか分からない。 Webを検索した後、私はこれを追加しました。

<modules runAllManagedModulesForAllRequests="true"> 

私のweb.configファイルに追加しましたが、まだ動作しません。

マイRouteConfig.csこの

public static void RegisterRoutes(RouteCollection routes) 
    { 
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 

     routes.MapRoute(
      name: "Default", 
      url: "{controller}/{action}/{id}", 
      defaults: new { controller = "Site", action = "Index", id = UrlParameter.Optional }, 
      constraints: new { subdomain = new SubdomainRouteConstraint("www") }, 
      namespaces: new string[] { "DeltaNorgeWebsite.Controllers" } 
     ); 

     routes.MapRoute(
      name: "Files", 
      url: "{id}", 
      defaults: new { controller = "File", action = "Index" }, 
      constraints: new 
      { 
       subdomain = new SubdomainRouteConstraint("files") 
      } 
     ); 

#if DEBUG 
     // redirect localhost 
     routes.MapRoute(
      name: "LocalhostRedirect", 
      url: "", 
      defaults: new { controller = "Redirect", action = "Index", path = "http://www.delta-norge.com" }, 
      constraints: new 
      { 
       subdomain = new SubdomainRouteConstraint("localhost") 
      } 
     ); 
#endif 

    } 

のように見えるこれは、あなたは2通りの方法でこの問題を解決することができるウェブサイト

http://deltanorge.cloudapp.net/

答えて

0

へのリンクです:

1)」を有効あなたのIISマネージャでWebサイトの「リストディレクトリ

2)はあなたのローカルホストは、それが果たすべきファイルを知らないあなたのウェブサイトのための

+0

あなたのweb.configファイル内の任意の例を、これを使用しますか? – mohsinali1317

+0

stackoverflowの上のこの回答を参照してください。http://stackoverflow.com/questions/18981118/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-con – Mivaweb

0

を既定のドキュメントを設定します。従うこと

<system.webServer> 
    <defaultDocument> 
     <files> 
     <add value="formpage.aspx" /> <!-- write your main page here --> 
     </files> 
    </defaultDocument> 
    <directoryBrowse enabled="false" /> 
    </system.webServer> 
関連する問題