Wednesday, April 27, 2011

File Not Found. on Sharepoint page

File Not Found.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Windows SharePoint Services

This is another very common error I have found people getting completely stumped at. There is no error description, no debug information, nothing. Just a short sweet error saying “File Not Found”.

Don’t get stumped with this error. This is a very straighforward error which actually means that the page did not find one of the files it was asked to process. You must be wondering just what these files can me. So let me try to quickly rememeber on what kind of files I have faced this error.

   1. Any includes, usercontrols added to the template are not accessible. Check the link ( relative or absolute ). Most of the time the link is wrong.

   2. DLL’s missing. If you have added a webcontrol or a webpart in the template, then it might be that the page is unable to find the dll. You may have placed the dll in the bin directory in your website’s root but it might be that that particular page is in some other virtual directory and is referring to some other web.config and bin directory. e.g. For most pages from _layouts, the bin directory it referrs to is _layouts/bin and not _layouts/1033/bin. These kind of errors are very easy to overlook.

   3. If you code for using an alternate header, and the relative path to use that alternate header may be wrong and not loading the page.

I cannot think of any other reasons for this error to generally appear. Let me know if I forgot any. Most of the time it is either #1 or #2 which causes that error.