Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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 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

 
discard

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.