Disable Directory Listing of Website in Visual Studio

Last Reply on Feb 06, 2014 10:41 PM By Mudassar

Posted on Feb 06, 2014 04:52 AM

Hello all.

 

pls help me how can i stop users to List Directories in my website.

i want to stop Directory Listing of my website.

i used the code in web.config

<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>

But this code is not working.

 

Please help on it.

 

Thanks in Advance...

 

You are viewing reply posted by: Mudassar on Feb 06, 2014 10:41 PM.
Posted on Feb 06, 2014 10:41 PM Modified on on Feb 14, 2014 04:49 AM

Add the following in System.WebServer section

<directoryBrowse enabled="false" />

Like below

<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>