Directory Browsing

This tool allows you to enable and disable directory browsing.  When Directory Browsing is enabled, all of the files within a subdirectory are displayed in the browser if there is no default page (see Default Documents).

To allow the contents of a directory to be listed when no default page is present, set "Current Directory Browsing Setting" to "On."

To prevent the contents of a directory to be listed when no default page is present, set "Current Directory Browsing Setting" to "Off."

Note: By default, Directory Browsing is turned on.

Manually Coding Directory Browsing in Your Application's web.config File

This process varies based on whether the Site or Application has an existing web.config file.

If the web.config File Exists

Open the existing web.config file and place the following code between the lines of <system.webServer> and </system.webServer>.  Set it to either "true" or "false".

<directoryBrowse enabled="false" />
If the web.config File Does Not Exist

If there is no web.config file for the site or application root, place the following code inside a text document.  Set it to either "true" or "false".  Save the file and name it web.config, then upload it to the root folder of your site or application with your preferred FTP application.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <directoryBrowse enabled="false" />
  </system.webServer>
</configuration>