Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all

in htaccess we able to prevent from Indexing file of Directory
Options -Indexes
but i need for asp.Net
htaccess file use in php but i need in Asp.Net


Thanks so Much
Posted
Updated 30-Nov-14 19:02pm
v2

1 solution

you can set this on your web config file, check below sample web config
XML
<configuration>
   <system.webserver>
      <directorybrowse enabled="false" />
   </system.webserver>
</configuration>

if you want to enable directory browsing set directoryBrowse as true, if you host your web application in IIS you can follow the below steps
http://technet.microsoft.com/en-us/library/cc731109(v=ws.10).aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900