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 want to configure a custom 404 page for my SharePoint 2010 environment.

My first task was to create a custom 404 page (htm). and save it under c:\inetpub\custerr\en-US\404Custom.htm

After this I edited the 404 entry from my IIS (Picture) and run a iisreset. enter image description here

But when I want to open a SharePoint site, I getting a eror message that the path is not correct (Picture 2). So I changed the path to %SystemDrive%\inetpub\custerr\\404Custom.htm

enter image description here

But it doesn´t work!

Why says my IIS that my path ist bad?

(By the way, I don´t found a way to set the "Entry Type" back to Inherited so I removed the custom error entrys from the web.config. And all works fine and the GUI shows Inherited.)

share|improve this question
    
I followed Microsoft's instructions at support.microsoft.com/kb/941329 ("How to point to a custom 404 error Web page in SharePoint") and got negative results. My environment's factors are: * A single public SP 2010 server. * This server has a Web application hosting host-named site collections. * I wish to apply the custom 404 page to one of the site collections. I even applied the steps in kb941329 to our SP 2010 development server, specifically, to a Web application not hosting host-named site collections and got negative results. I don't want to apply the steps here to the Web applic –  Willy Jan 15 '13 at 17:55
add comment

2 Answers

up vote 3 down vote accepted

I'd take a look at the following: Sharepoint 2010 Custom Error Pages

I don't think there's a need to do anything, but leave the pages alone in IIS.

  1. Place your custom error pages in the custerr directory
  2. Edit the web.config file for your webapp(s)
  3. Update the customErrors node to include your custom pages
  4. Update the httpError node to turn on custom errors
  5. IIS Reset
share|improve this answer
add comment

I haven't actually tried this myself in 2010, but I didn't think it was necessary to edit the web.config file manually these days. AFAIK, SharePoint Foundation does not support the custom error pages that are typically used in IIS sites.

Check out this post by Todd Carter.

You could use a feature receiver to deploy a custom error page into the SharePoint root folder (e.g. 14\TEMPLATE\LAYOUTS\1033\customerrorpage.html), then update the SPWebApplication.FileNotFoundPage property with a relative path to your file.

Using the feature you could then turn the capability on and off. Give it a go and let us know how you get on!

EDIT - this MS KB article is probably what you are looking for. As you would expect you can also use PowerShell to set the FileNotFoundPage property.

share|improve this answer
    
This is the correct answer. You do not want to get in the habit of customizing IIS on your SharePoint web front ends because you must manually maintain these configurations across each WFE in your farm. If you do it via the SharePoint framework, then your changes are captured in your SharePoint configuration and will be automatically synchronized to all WFEs as you apply them. –  tyshock Jan 24 at 16:09
add comment

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.