This error occurs when attempting to view an asp.net application (using the Run button or right clicking on the project and selecting 'View in browser').
This usually occurs because the browser is looking for something that does not exist. For example, when using the project name 'MyProject', VS opens a browser with the following URL:
Although this points to a project (virtual directory/application within IIS), it does not point to a specific resource. In my case I just want it to point to the default page 'default.aspx'.
Normally, if a specific resource is not specified, IIS will look for a default resource - in this case however the name of the page I want to use (default.aspx) is not registered as a default document.
To fix:
1) Start IIS management tool (either from 'Computer Management' or Control Panel - Administrative Tools - Internet Information Services).
2) Right click on your projects virtual directory and select Properties.
3) Select the Documents tab.
4) Click on the 'Add...' button.
5) Enter 'default.aspx' (without quotes) and click OK, then click OK back on the Properties dialog.
This will add default.aspx to the list of default documents IIS will look for - but only within your app's virtual directory. To set this globally (eg for all apps/virtual directories within IIS), do the same - but for step 2) right click on the website ('Default Web Site' on Windows XP) instead of your virtual directory.
HTH
Tim