1

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.

0

3 Answers 3

0

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/

0

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

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.