you can set this on your web config file, check below sample web config
<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[
^]