Solution 1 – Final – best practice

Insert in Web.Config of the Website inside system.webServer those lines –



<add value="index.aspx" />



The value is obviously your default document.

Solution 2

The problem is probably your site doesn’t know what is the default web page it must enter .

So you must define it at



Add your start page inside , for instance :



Add –> insert the page name –> you can see it added (in my case index.aspx)

It will work now..


Why is this solution bad?

Each time you’ll upload your WebSite you’ll need to define the Default Document .

If you’ll forget the application won’t work.


Solution 3


Other solution I’ve found at .


If you are using IIS 7 then you probably might face this error.It’s a little frustrating when such errors occur and simple IIS 6 or IIS 5.1 users when it was really simple to configure and run a website, those users feel really hooked up.

I myself faced a lot of issues but as you progress with IIS 7 you will find it simple to configure and very easy to manage.

As far as this issue is concerned in the earlier versions of IIS we used to just set the directory browsing checkbox to be checked in order to enable directory browsing on the virtual directory or the website, its really simple in IIS 7 also just click the directory browsing option in the configuration section and on the right side of the directory browsing view you will find enable by default directory browsing is disabled.It will be more clear from the below image.



This will solve your Directory Browsing issue for IIS 7.Stay tuned for more on IIS 7 tips and tricks series.



Why is this solution bad?

The second solution I’ve found I am not sure about what are the security outcomes of permitting browsing the whole website directory ..

I think that people can just enter the System Folder on your Server – it’s a severe security problem.