A pet peeve of mine has long been the undescriptive errors SharePoint shovels out by default. You know, when you change a line of code and now your page renders only “An unspecified error has occured”. Pretty annoying right?
Turns out you can turn these into descriptive error messages which will actually help you identify the problem, what a novel idea.
Turns out I missed Tyler Butler mention this on his great post about his experience recreating his website using Microsoft Office SharePoint Server 2007.
Luckily for me, Andrew Connell brought this to my attention just a few days ago as I was ranting about useless error messages so I figure this deserves it’s own post.
To turn on friendly error messages in your web applications web.config (found via INETPUB).
- Disable Custom Error Pages by setting this web.config entry: customErrors=off
- Enable Stack Traces by adding this property to the SharePoint SafeMode tag also in web.config: CallStack=”true”
Sorry for the lack of braces, my blog is not acting friendly to code display today. SharePoint Safemode are tags, as is customerrors.