Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have tried below in we.config

C#
<location path="Views">
  <system.webServer>
    <directoryBrowse enabled="false" />
  </system.webServer>
</location>


But it's still showing me directory lists.

Please help. Thanks in advance
Posted
Comments
JoCodes 24-Dec-13 0:52am    
Which is your IIS version
srmohanr 24-Dec-13 0:54am    
IIS 7.0

If the IIS version is 7+ it should work as per the configuration already done in web config.
In case IIS 6 , try it in IIS Manager like

Run > inetmgr

go to Navigation in IIS Manager

Features View > Directory Browsing

Actions Pane > click Enable/Disable
 
Share this answer
 
Comments
srmohanr 24-Dec-13 4:30am    
I have tried, this. But still I am able to access the directory lists
 
Share this answer
 
Comments
srmohanr 24-Dec-13 6:59am    
I am new to .Net. This is what I have understood from that.
Please rectify, if I commit any error.

location path="Views"
directorybrowse enabled="false"
location

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