Following applies to IIS 7
The error is trying to tell you that one of two things is not working properly:
- There is no default page (e.g., index.html, default.aspx) for your
site. This could mean that the Default Document "feature" is
entirely disabled, or just misconfigured.
- Directory browsing isn't enabled. That is, if you're not serving a default page for your
site, maybe you intend to let users navigate the directory contents
of your site via http (like a remote "windows explorer").
See the following link for instructions on how to diagnose and fix the above issues.
http://support.microsoft.com/kb/942062/en-us
If neither of these issues is the problem, another thing to check is to make sure that the application pool configured for your website (under IIS Manager, select your website, and click "Basic Settings" on the far right) is configured with the same .Net framework version (in IIS Manager, under "Application Pools") as the targetFramework configured in your web.config, e.g.:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime targetFramework="4.0" />
</system.web>
I'm not sure why this would generate such a seemingly unrelated error message, but it did for me.