I had a fresh installation of SharePoint 2010 and everything was all fine. I created a subsite and that was fine too – until I went into Site Settings of the subsite. SharePoint gave me the error below:
File Not Found.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 2cd97b26-9dba-4e52-af70-9b886367690a
Date and Time: 10/13/2010 11:02:37 PM
Going into Site Settings of the root web was still fine though.
Googling this will show that the problem is because Alternate Access Mapping (AAM) is not properly configured. What annoyed me was that no one went into the details of how to configure it properly (OK! so I was a newbie and didn’t know how).
You can configure AAM by going to Central Admin, then System Settings, then Configure Alternate Access Mappings. In here, you need an entry that matches the URL you are using to visit the subsite. Explanation below.
When you install SharePoint, it will automatically add an entry with your computer name, e.g. http://mycoolserver/. If you were using this URL to access you Subsite (i.e. http://MyCoolServer/Subsite1/_layouts/setting.aspx) then everything will be fine and you don’t need to do anything.
However, if you are like me, then you’d be access it using http://localhost/Subsite1/_layouts/setting.aspx, in which case it will not work, and you will need to add http://localhost/ as an entry to the AAM list.
This configuration will also affect SharePoint Designer. I posted about a problem in SharePoint Designer where you get an error when editing a list form if you opened the site using http://localhost/ (http://bernado-nguyen-hoan.blogspot.com/2010/09/can-edit-list-forms-in-sharepoint.html). It turns out you can get this to work by configuring AAM as above.