I just tried to access property "FileNotFoundPage" for a web application and its coming up as null, I wonder if its null by default or if something changed it to null.

I would also like to know what would be the best practice for setting up custom pages, e.g. should I create a Http.Module(which I already created) or any other way except modifying " sps404.html" page in 12 hive.


The default value is null which sililar to empty string or wrong filename gives the default handling.

If having the same error page for the entire web app is OK, then I'd recommend setting SPWebApplication.FileNotFoundPage instead of using a HttpModule. Remember that the filename is relative to {SharePointRoot}\TEMPLATE\LAYOUTS{LCID} and the file should contain more that 512 bytes

  • thanks, but what if you have a custom error page, which is a asp.net page then we have no choice but to use "http module" – Muhammad Raja Oct 31 '12 at 12:11
  • You can have a html page which makes a redirect similar to sps404.html – Per Jakobsen Oct 31 '12 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.