Turning on full error messages

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.