locked
IIS Custom Error Page for common error RRS feed

  • Question

  • I have SharePoint 2013 Enterprise on Windows 2012. Configure as website. I have also configure Page Not found (error 404) on my SharePoint.

    Now Situation is that when there is error as below on SharePoint, due to that website is down, I was looking to make Temporary page on my server outside SharePoint and want to display that page whenever below error.

    Kindly can somebody guide me how can we do that.

    400 Error (bad request)
    401 Error (unauthorized)
    403 Error (forbidden)
    500 Error (internal server error)
    Tuesday, February 9, 2016 9:17 AM

Answers

  • Hi Milind Saraswala,

    You can follow Reema Bhingarde’s suggestions: Create a custom HTTP Error Response.

    1. Open IIS Manager, select the SharePoint server.

    2. In Features View, double-click Error Pages.

    3. Select a static code, and edit it. Set “Insert content from static file into the error response” to serve static content.

    But we cannot customize the following HTTP errors: 400, 403.9, 411, 414, 500, 500.11, 500.14, 500.15, 501, 503, and 505.

    For more details, you can check the following link provided by Reema Bhingarde:

    https://technet.microsoft.com/en-us/library/cc753103%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

    Best regards,

    Linda Zhang


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Victoria Xia Friday, February 26, 2016 3:37 AM
    • Marked as answer by Victoria Xia Sunday, February 28, 2016 1:05 PM
    Wednesday, February 24, 2016 2:42 AM

All replies

  • Hi,

    Following article might help you with the above configuration and requirement:

    How To Set Up Custom Error Pages In IIS 7.5 With ASP.NET

    Create a Custom HTTP Error Response (IIS 7)

    Hope this helps :)

    Wednesday, February 10, 2016 6:29 AM
  • Hi Milind Saraswala,

    What did you mean “outside SharePoint”? Did you mean the temporary error page comes from the internet?

    If yes, you should add the error page for other types of error following the steps below:

    1. Browse to C:\inetpub\wwwroot\wss\VirtualDirectories and open the folder associated to the SharePoint site you would like to affect.

    2. Edit the file web.config and find the keyword customErrors.

    If you have one page for all the errors, you should replace the complete <customErrors> code block with:

    <customErrors mode="On" defaultRedirect="https://the page’s URL"/>

    If you create various pages for the different errors, you need to replace the complete <customErrors> code block with:

    <customErrors mode="On" defaultRedirect="/Pages/ErrorPage.aspx">
    <error statusCode="400" redirect=" https://the page’s URL " />
    <error statusCode="401" redirect=" https://the page’s URL " />
    <error statusCode="403" redirect=" https://the page’s URL " />
    …
    </customErrors>

    Best Regards,

    Linda Zhang


    Wednesday, February 10, 2016 8:59 AM
  • Thank you for the reply.

    As per your solution it will redirect to pages in SharePoint when there is error.  But suppose, if we have error like 500 Internal error that SharePoint will be also down and redirecting to the SharePoint page will also give error.

    So can we display static html page which is hosted outside the SharePoint and whenever error happen we can show that page.

    Hope I could clear my point

    Wednesday, February 10, 2016 4:36 PM
  • Hi Milind Saraswala,

    You can follow Reema Bhingarde’s suggestions: Create a custom HTTP Error Response.

    1. Open IIS Manager, select the SharePoint server.

    2. In Features View, double-click Error Pages.

    3. Select a static code, and edit it. Set “Insert content from static file into the error response” to serve static content.

    But we cannot customize the following HTTP errors: 400, 403.9, 411, 414, 500, 500.11, 500.14, 500.15, 501, 503, and 505.

    For more details, you can check the following link provided by Reema Bhingarde:

    https://technet.microsoft.com/en-us/library/cc753103%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

    Best regards,

    Linda Zhang


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Victoria Xia Friday, February 26, 2016 3:37 AM
    • Marked as answer by Victoria Xia Sunday, February 28, 2016 1:05 PM
    Wednesday, February 24, 2016 2:42 AM
  • The only way is use the Set-SPCustomLayoutsPage that is introduced in CU April 2014.

    https://technet.microsoft.com/es-es/library/ff607768.aspx

    Tuesday, November 28, 2017 12:31 PM