Navigate Up
Sign In
Supporters of Developer
Web

SharePoint 2013: Custom Error Pages

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.

You may also be interested in: Critical Path Training

 

Editor's note: Contributor Gokan Ozcifci is a SharePoint Consultant at Vision IT Group. Follow him @gokanozcifci

A great change in the new version of SharePoint Server is that there is a support of Custom HTTP 404 Error Pages. In this post we will take a look how to create a new 404 page.

All Publishing sites contain a default a 404 Error page “PageNotFoundError.aspx” page which is added to the App "Pages Library" therefore connect to a Publishing site. If you don't have any publishing sites, check the image, to see how to create one.

2013-01-20-CustomError-01.png

After you create your site, you can go to your site's contents and check under your App "Page library" for the current and out-of-the-box PageNotFoundError.aspx

2013-01-20-CustomError-02.png

To allow users to create a new custom Error page, Publishing Sites now contain a new Content Type “Error Page“. This Content type Inherits from “Page” Content type and has a typical layout of a Page Not found. To find this Content Type, Navigate to Site Settings -> Content Types -> Error Page.

2013-01-20-CustomError-03.png

You can modify this page to add some text or images. But we want to create a new custom Error Page. For this go back to your App "Page Library" and create a new document "Error Page"

2013-01-20-CustomError-04.png

Provide some information and be sure that you select an (Error Page) Error.

Title: Custom Error Page
Description: Custom Error Page gknzcfc.net
URL Name: Custom-Error-Page

2013-01-20-CustomError-05.png

You will now see your new page appearing under your App.

2013-01-20-CustomError-06.png

Check out, and make modifications to your page. I'm a huge lover of Doctor House, so I added a picture of him to make clear that the page was not found :^)

2013-01-20-CustomError-07.png

I received a question from Isha [MVP SharePoint] asking about "how we could set a custom error page as default

2013-01-20-CustomError-08.png

The answer is quite simple:

2013-01-20-CustomError-09.pngRename "your" custom error page to PageNotFoundError.aspx and delete the out-of-the-box

2013-01-20-CustomError-09.pngUse the FileNotFoundUrl via Visual Studio. Get the SPSite server relative URL or absolute URL to the file not found page. This value is used as a redirect URL for an HTTP request where the resource cannot be found.

But, what if you do not want to create a new one, but only want to modify?

We’ve all seen it; the SharePoint 20xx error message is something terribly not "user-friendly".

Now, I like the Correlation ID and being able to track the error down. However, in real world scenarios it’s unlikely that our users will leave this screen up and copy/paste to our support group. Wouldn’t it be nice to have a warmer error message with our company logo and a link that will ask the user to send the error details?

2013-01-20-CustomError-09.pngConnect your Application Server and navigate to 15>TEMPLATE>LAYOUTS

2013-01-20-CustomError-10.png

2013-01-20-CustomError-09.pngLocate and copy the error.aspx file. Never never never ever touch the system files. Make copies and use those and if something goes wrong you can always come back.

2013-01-20-CustomError-11.png

2013-01-20-CustomError-09.pngOpen the error.aspx with notepad and paste the following items to get a LOGO and a HYPERLINK:

Logo


<asp:Panel id="ErrorPageTitlePanel" runat="server" tabindex="0">
<img src="vcg.jpg"/><br/><br/>Vision Consulting Group:</span>
< /asp:Panel>

Ticket Link


<asp:Panel id="PlaceHolderPageTitleInTitleArea" runat="server"><p>
<a href="mailto:info@gknzcfc.net?subject=New SharePoint Incident&body=<Please provide a short description and paste error >">Log SharePoint Support Ticket</a></p></asp:Panel> 

2013-01-20-CustomError-09.pngYou can choose where you want to copy those elements (think logic). When finished, you can save and try to get a Correlation ID. If everything went right, you should receive an error screen like this:

2013-01-20-CustomError-12.png

2013-01-20-CustomError-09.pngAnd when somebody clicks on "Log SharePoint Support Ticket" Outlook will open a new message and the user has only to enter some information and click "send"…

2013-01-20-CustomError-13.png

Happy Configuring,
G.

Categories: SPF 2013; dev; Visual Studio

Comments

Kalyan Bheri

powershell is an easier option

$spsite = Get-SPSite "Web App URL" $spsite.FileNotFoundUrl $spsite.FileNotFoundUrl =

Posted 10-May-2013 by Kalyan Bheri
Kalyan Bheri

powershell is an easier option

$spsite = Get-SPSite "Web App URL" $spsite.FileNotFoundUrl Returns the configured path $spsite.FileNotFoundUrl = "New relative or absolute path"

Posted 10-May-2013 by Kalyan Bheri
Kalyan Bheri

powershell is an easier option

$spsite = Get-SPSite "Web App URL" $spsite.FileNotFoundUrl Returns the configured path $spsite.FileNotFoundUrl = "New relative or absolute path"

Posted 13-May-2013 by Kalyan Bheri
alex

mann

Your blog provided us accompanying precious info to pace beside. mannequins Total full honorariums of your warning are extraordinary. Blesss

Posted 12-Nov-2013 by alex
jenny

nhi de raha

The most awesome post I've ever seen. Truly great post. I think this is just the one of the best posts I've ever seen. Thanks for giving me that! and good artical on this topic and guys for Online B2C Marketplace Trading Directory for Consumer Electronic Goods & Appliances Manufacturers, Gifts & CraftsExporters, Telecommunications Retailers, Computer Software, Hardware and Peripherals Distributors and Sports & Entertainment wholesallers is Sawdagger...cheak it. Thank you for sharing this post. It's aware me about this. i had great time reading on some comments. I'm gonna share this on to my friends....thankx

Posted 26-Nov-2013 by jenny
sami

cust

We hold directly part bent some gang of top rated custom paper sites internet journalists per numerous alien trainings to coerce indisputable during you think many of us for befriend we could fit up a soul having different fellow accompanying total the didactic story you poverty.

Posted 29-Nov-2013 by sami
alima

nice

Magnificent beat ! I would like to apprentice even as you amend your website, how can i subscribe for a weblog web site? The account aided me a applicable deal. I have been a little bit acquainted of this your broadcast offered vibrant clear idea.http://www.dalkiamarianskelazne.org |
http://www.directtv4schools.org |
http://www.ebm2008.org |
http://www.eggdonornetworkalliance.org |
http://www.naturschutzgeschichte.com |
http://www.amcharterschool.org |

Posted 15-Jan-2014 by alima
casper

Details

This is as easy o follow article on how to create and updated a 404 page. I liked the read and it has been well written. Such websites can be created in this manner and I will be soon creating one of the sorts. derma microneedle roller review

Posted 19-Feb-2014 by casper
Bulk SMS

A wonderful conclusion there. It was of great help to me.

A wonderful conclusion there. It was of great help to me.As I can see you have a wide knowledge about this topic, thanks a lot for comprehensive information. Bulk Sms

Posted 29-Mar-2014 by Bulk SMS
freedebtconsolidationquotes.com

info

It has been pushed to the barriers in sum qualitys of plights. It was created to name well beyond the HP classification of a thoroughfare cycle so it can adopt the hurt from flat the highest floor performance cowboy.

Posted 07-Apr-2014 by freedebtconsolidationquotes.com
sana

plus

I akin the Relationship ID plus mortal clever to path the miscue fuzz. Nevertheless, in palpable earth scripts it’s improbable that our users devise bequeath this sift up further parrot/glue to our truss faction. Great Website

Posted 10-Apr-2014 by sana

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: