Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do i get directory listing on IIS when default.aspx exists in that directory

share|improve this question
sounds like you're trying to 'hack' something... – cpbills May 18 '10 at 20:16

For IIS 6, you will need to enable Directory Browsing and remove all document's from Document tab.

For IIS 7, you will need to add the following in the web.config file under the parent directory i.e. C:\inetpub\wwwroot

<?xml version="1.0" encoding="UTF-8"?>
        <directoryBrowse enabled="true" />
        <defaultDocument enabled="false" />
share|improve this answer

If you are using IIS 6.0, remove "default.aspx" from the listings in the "Documents" tab. Make sure that "Directory Browsing" is checked in the Home Directory tab.

If it is IIS 7.0, let me know and I'll look up the settings there.

share|improve this answer

Aside from removing or disabling the default.aspx file? Not sure there is a way. Rendering the HTML as opposed to the index is the designed behaviour.

share|improve this answer

The presence of default.aspx does not control directory browsing. If you have a default document defined (regadless of the directory browse setting) clients will connect to the page defined in default documents, if no other page is requested. If directory browsing is enabled and no default document is specified the client will recive a directory list.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.