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 recently Developed a really simple web part scoped to site (or at least it's feature is). I also created a feature that up[on activation is suppose to create a new content type.

That's fine and dandy, accept when I deploy the solution to my Dev environment I get the following screen, after going to Settings -> Manage Site Features -> Activate Feature Name

enter image description here

Now the screen seems pretty simple, I managed to find where the webconfig file was and I did change its already <customErrors mode="Off" /> to <customErrors mode="Off" />

What I don't understand is:

  • How do I create a page that displays errors instead of me seeing this page?
  • Where would this page that I create, according to the image, live? Would my web part create a new layout?

I am a complete newb when it comes to SharePoint development and its error pages it throws. I have to learn on the job so I am turning to the community for help on this one.

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

Here's a quick and dirty way of setting this up:

http://navdeep19.wordpress.com/2011/04/28/sharepoint-2010-how-to-create-custom-error-page-for-sharepoint-website/

I'm not the biggest fan of dumping stuff directly into the 14 hive (I would wrap an application page up in a solution instead) but that at least should give you the Powershell to get started. And if you wanted to customize error pages for different HTTP responses, here's a decent guide to how to do that:

http://www.ngpixel.com/2010/12/23/sharepoint-2010-custom-error-pages/

share|improve this answer
add comment

It seems that SharePoint application page is throwing the exception so you need to enable <customErrors mode="Off" /> for application pages to read the full error message. You can fairly easily enable the full errors by manipulating web.config located in 12/14/15 hive layouts folder i.e. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS

You can even set your own Custom Error pages as depicted in the following blog

share|improve this answer
add comment

There's more than just one config file for SharePoint sites. It'll need changing in all.

share|improve this answer
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.