title: ASP.NET MVC5 The webserver is not configured for the requested URL, and directory browsing is not enabled on the server
body: <p>I have an issue with loading the pages from a MVC5 application. </p>
  
  <p>I have this software installed and used:  </p>
  
  <ul>
  <li>Windows 10</li>
  <li>Visual Studio Enterprise 2015 </li>
  <li>Microsoft IIS 10.0 Express </li>
  <li>MVC 5 with Entity Framework</li>
  </ul>
  
  <p>Until now everything worked fine and I was able to display the website. 
  After creating a model and after that a controller using the entity framework I got this error message. </p>
  
  <pre><code>HTTP Error 403.14 - Forbidden
  The Web server is configured to not list the contents of this directory.
  
  Most likely causes:
  
      A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
  
  
  Things you can try:
  
      If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
      Enable directory browsing.
          Go to the IIS Express install directory.
          Run appcmd set config /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the server level.
          Run appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the site level.
      Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
  
  Detailed Error Information:
  Module     DirectoryListingModule
  Notification       ExecuteRequestHandler
  Handler    StaticFile
  Error Code     0x00000000
  Requested URL      http://localhost:2063/
  Physical Path      c:\users\johan\documents\visual studio 2015\Projects\MvcMovie2\MvcMovie2
  Logon Method       Anonymous
  Logon User     Anonymous
  Request Tracing Directory      C:\Users\johan\Documents\IISExpress\TraceLogFiles\MVCMOVIE2
  </code></pre>
  
  <p>So first I started with the suggestions the error message is giving me.   </p>
  
  <p>These both worked fine.<br>
   - cd into the IIS Express install directory<br>
   - <code>appcmd set config /section:system.webServer/directoryBrowse /enabled:true</code>  </p>
  
  <p>Then I tried to run this command:<br>
  <code>appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true</code></p>
  
  <p>Where I replaced <code>["SITE_NAME"]</code> with:<br>
  - <code>["SITE_NAME"]</code><br>
  - <code>["localhost"]</code><br>
  - <code>["MovieDb2"]</code><br>
  - <code>"MovieDb2"</code><br>
  - <code>[MovieDb2]</code><br>
  - <code>MovieDb2</code><br>
  None of them worked and I got an error message:<br>
  <code>ERROR ( message:Cannot find SITE object with identifier ["SITE_NAME"]</code>  </p>
  
  <p>I have been able to find a lot of documentation, but that all goes back to <code>.ASPX</code> format and older versions of IIS Express.  </p>
  
  <p>In Visual Studio I right clicked on one of the index.cshtml files of the application and clicked "Set as start page"<br>
  This didn't work, even after a rebuild.  </p>
  
  <p>Next I found some information that you would have to make some changes in IIS manager. I have searched a lot, but I am not able to find IIS manager.<br>
  Even using this link: <a href="https://msdn.microsoft.com/nl-nl/library/bb763170.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/nl-nl/library/bb763170.aspx</a><br>
  The command <code>inetmgr</code> only returns an error. </p>
  
  <p>To Web.config I added this code:  </p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>That didn't solve the problem either.</p>
  
  <p>After that I followed the steps from this page: <a href="https://stackoverflow.com/questions/15816924/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-conte">HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory</a>  </p>
  
  <p>But there I also have to get into the IIS manager, which I am not able to find. </p>
  
  <p>I really hope someone has a solution for this.<br>
  Thanks in advance. </p>