Wednesday, May 14, 2014

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory (AngularJS)

Recently interested on AngularJS, I started reading Dan Wahlin's AngularJS material and downloaded the samples in Visual Studio 2012. Upon running the code, I encountered an error which is the title of this post. After days of testing, I noticed that the url doesn't change on runtime since each examples are treated as partial views loaded into a main view. This lead me to the right direction which is a solution from Microsoft on enabling defaultDocument in web.config.

Web.config:
  <system.webServer>  
    <defaultDocument enabled="true">  
      <files>  
       <add value="home.html" />  
      </files>  
    </defaultDocument>  
   </system.webServer>  
Where home.html is the main html document which the partial views are loaded.

0 comments:

Post a Comment