- Posted by karthik on September 25, 2008
I had been meaning to post this before but did not get a good snapshot of the exception to detail it. Got one today that I thought I could use for an explanation.
On a recent MOSSIF site project that I have been working, there were a number of customizations made to the application to satisfy branding and app requirements. Some of them involved custom Master Pages and user controls within them. When we started deploying the changes using custom packaged features and solutions, testing instance pages on the site kept throwing a variation of the error below or a 404 - Page Not Found. After some tinkering around, we finally figured that there were three basic scenarios when the exception below would happen as opposed to a page not found.
1) The Master Pages we had deployed consisted of a standard main header user control that bundled other shared user controls for search, date time etc inside of it. There was a reference broken inside of this that was causing the MP to go, "hey, wait a second, I can't find this". However, instead of telling us that nicely, Sharepoint took the (easy) route above and essentially told us that it could not the page itself. Notice that the description is still HTTP 404. The solution was to tinker around all user control references everywhere within the MP and the controls inside out to identify the one that was broken!
2) The more common scenarios that lead to the HTTP 404 Page Not Found error is when publishing is turned on and the page requested has not been approved for anon viewing yet! The case could also be made that either the instance or layout page does not exist but that is more of an exception than anything else.
Cheers!