5
Answers

Prevention to access the root directory.

Dipesh Tare

Dipesh Tare

10y
557
1
Hi,

I have my asp.net application  running well, but I have to prevent the listing of root directories.
 
Like my url is : www.abcd.com and in that I have folder of account, in which i have the accountPatient.aspx,
so the full url will be :  www.abcd.com/account/accountPatient.aspx
 
When I edit the accountPatient.aspx, it remains a www.abcd.com/account and when I press the enter key it is showing all the directories under account folder, so I need to prevent the showing of root directories and has to be redirect to Home page. Can any one knows how to do it? I searched upon the Google but I didn`t find a particular answer.
 
Thanks.
Answers (5)
0
Khargesh Rajput

Khargesh Rajput

NA 7.4k 285.1k 10y
as per my knowledge by disable directory browsing  we can Prevent to access the root directory.


https://www.youtube.com/watch?v=WO1AwWW03po

http://serverfault.com/questions/320964/ftp-iis-7-5-stop-deny-directory-listing
0
Dipesh Tare

Dipesh Tare

NA 100 18.3k 10y
Not helpful.
0
Khargesh Rajput

Khargesh Rajput

NA 7.4k 285.1k 10y
0
Dipesh Tare

Dipesh Tare

NA 100 18.3k 10y
Hello Khargesh Sir,

I am doing it in IIS, and unchecked the Enable Directory Browsing.
0
Khargesh Rajput

Khargesh Rajput

NA 7.4k 285.1k 10y
in your website host panel uncheck Enable Directory Browsing