One of the first things you will realize when working on your custom master page is that when you
Make a mistake, Sharepoint's default error messages are rather unhelpful. As mentioned earlier, if
You omit one of the required content placeholders and browse a site that uses your master page,
SharePoint will reply with simply "An Unexpected error has occurred." The first time this happens,
It's hard not to respond with some choice curse words and give up completely on SharePoint,
Don't throw in the towel yet. SharePoint can actually return descriptive error messages, but they
Are turned off by default for security reasons. If you are working in a development environment,
Though, it's imperative to enable these full error messages.
Here are the steps for turning on the full error messages:
1.Log in to the physical Sharepoint Server machine and navigate to the directory that
Holds your SharePoint website. It will most likely be located at c: \ Inetpub \ wwwroot \
WSS \ virtualdirectories \ and will be in a subdirectory with the port number of your
SharePoint site. If you have trouble fi nding it, you can open iis7 and in the sites folder, rightclick
Your SharePoint site, and then select province e. This will take you directly to the directory
That holds your SharePoint website.
2.Locate the fi le named Web. config and open it for editing in notepad.
3.Press Ctrl + F and fi nd the line of code that contains the word "callstack." You will fi nd a line
That looks like this:
<Safemode maxcontrols = "200" callstack = "false" directfiledependencies = "10"
Totalfiledependencies = "50" allowpageleveltrace = "false">
4.Press Ctrl + F again and this time search for the word "errors." You will fi nd a line that looks
Like this:
<Customerrors mode = "on"/>
Change the mode from on to off. This tells iis not to show its customary basic error messages
And to instead display the raw detailed error messages.
5.Save and close web. config. Note that this change will cause IIS to restart the Web Application
In which your SharePoint site resides. Be careful when making edits to this fi le in Production
Or shared development environments.