Monday, March 22, 2010

Not so custom error pages

So, in my live site when a user tries to access an item that's been deleted, SharePoint pops up this big ugly page that says in red letters "Server Error in '/' Application." It then gives details in equally fugly fonts but by that time the user is so confused and angry that they ignore everything and contact yours truly.

Ew.

I figured I should probably fix this so I tried to recreate it in my testing environment. Well, it looks all pretty and like an OOTB SharePoint page there. WTF??? Some testing environment.

After googling stuff like "custom sharepoint error page" and "customerrors sharepoint" and all sorts of other random junk and traipsing through IIS and web.config files and SharePoint Designer, etc. etc. etc. I came across SaurabhKV's blog which tipped me off to the solution. The CallStack attribute has to be set to false in the SafeMode element in the web.config file. Wait, huh? So it looks like this:

<configuration>
<SharePoint>
>SafeMode MaxControls="200" CallStack="false" ... >

...
</SafeMode>




Now I get pretty error messages that look like actual SharePoint pages instead of ugly ones that look like cr4p. Yay!

No comments:

Post a Comment