Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

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

4 Answers 4

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"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="true" />
        <defaultDocument enabled="false" />
    </system.webServer>
</configuration>
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

 
discard

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.