How to enable Directory browsing by default on IIS Express

Ahmed Magdy picture Ahmed Magdy · Dec 17, 2011 · Viewed 100k times · Source

Cassini (Visual Studio development web server) by default enables directory browsing, how can I enable directory browsing on IIS Express by default? (I don't want to have a separate configuration for each project I have?

Answer

Moni picture Moni · Mar 16, 2017
  1. Go to Web.config file of your project.

  2. Add the below two tags in <system.webServer> tag in web.config

<directoryBrowse enabled="true" />

<modules runAllManagedModulesForAllRequests="true" />