SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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

share|improve this answer
thanks, but what if you have a custom error page, which is a 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 posting your answer, you agree to the privacy policy and terms of service.

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