Link to home
Start Free TrialLog in
Avatar of kdschool
kdschool

asked on

IIS 7.0 directory browsing

I am trying to enable browsing for just a specific directory.  I am confused.  Do I have to enable this feature first for the default web site?  I only want this for one directory not the entire site but the feature is not letting me do this for just the one directory.

Can you assist please.
Avatar of Haresh Nikumbh
Haresh Nikumbh
Flag of India image

Scenario:  Let's say I want to enable directory browsing for a special directory on my site, how do I enable that?  It's as easy as:

1) create (or edit) the web.config file in your site's home directory

2) edit it as follows:

<configuration>

<location path="special_directory_name_here">
   <system.webServer>
    <directoryBrowse enabled="true" />
   </system.webServer>

</location>
</configuration>

Source :

http://blogs.iis.net/bills/archive/2008/03/24/how-to-enable-directory-browsing-with-iis7-web-config.aspx
Avatar of kdschool
kdschool

ASKER

Can I do this using the IIS interface I am not good with command prompt commands.
First of all its not command,

if you want to enable browse option for particular one directory then you need to create
web.config file in  your site's home directory

copy from below
+++++++++++++++++++

<configuration>

<location path="special_directory_name_here">
   <system.webServer>
    <directoryBrowse enabled="true" />
   </system.webServer>

</location>
</configuration>

++++++++

Copy this content in notepad and save that file as web.config

now you have to modify this file as per your details and save it to home directory
ok, do I save it under www root or Inetpub?
Also do I use a /WebArchives or just the WebArchives the diretory name right under the web root.
<configuration>

<location path="WebArchives">
   <system.webServer>
    <directoryBrowse enabled="true" />
   </system.webServer>

</location>
</configuration>
That need to keep in your site home directory..

so where you have kept all pages or data of your site ? inetpub / www/ or some other location?
I have this file already and it has all this code in it.  Do I just add this additional code or delete all this and then just have the code you gave me.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.html" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
        <tracing>
            <traceFailedRequests>
                <add path="*.asp">
                    <traceAreas>
                        <add provider="ASP" verbosity="Verbose" />
                        <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
                        <add provider="ISAPI Extension" verbosity="Verbose" />
                        <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI" verbosity="Verbose" />
                    </traceAreas>
                    <failureDefinitions statusCodes="500" />
                </add>
            </traceFailedRequests>
        </tracing>
        <directoryBrowse enabled="false" showFlags="None" />
    </system.webServer>
</configuration>
ASKER CERTIFIED SOLUTION
Avatar of Haresh Nikumbh
Haresh Nikumbh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
will apply to the entire site or just the one folder.  I only want one folder to have the capability for browsing.