2016-07-04 2 views
0

의 내용을 나열되지 않음으로 구성 8.5 IIS를하지만 그것은 로컬 호스트에 노력하고 있습니다는 웹 서버가 난 온라인 내 웹 사이트를 배포하려고이 디렉토리

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

그것은 나에게 오류를 제공합니다. 또한 클라우드 스토리지를 사용하도록 클라우드 설정을 구성하면 정상적으로 작동합니다. 그러나 나는 그 문제가 무엇인지 모른다. 웹을 검색 한 후 내 web.config 파일에

<modules runAllManagedModulesForAllRequests="true"> 

을 추가했지만 여전히 작동하지 않습니다. "

1) 수 :

내 RouteConfig.cs이이

http://deltanorge.cloudapp.net/

답변

0

당신은 2 가지 방법으로이 문제를 해결 할 수있는 웹 사이트에 대한 링크입니다이

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 

    } 

처럼 보인다 IIS 관리자의 웹 사이트에 대한 "디렉토리 목록"

2) 웹 사이트의 기본 문서를 설정하십시오.

+0

어떤 예를 따르시겠습니까? – 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

로컬 호스트는 어떤 파일을 사용해야하는지 모릅니다. 귀하의 web.config에서 이것을 사용하십시오.

<system.webServer> 
    <defaultDocument> 
     <files> 
     <add value="formpage.aspx" /> <!-- write your main page here --> 
     </files> 
    </defaultDocument> 
    <directoryBrowse enabled="false" /> 
    </system.webServer> 
관련 문제