"An unexpected error has occurred"
This message doesn't tell you the least bit about the error and it's pretty hard to troubleshoot the issue based solely on this error message. So what you need to do is edit the web.config to allow the actual error message to be displayed. In this article I will tell you what you need to do to turn on Custom Error Messages in SharePoint 2007. I will also try to explain (defend) why Microsoft's default configuration is to display the generic error message.
In order to turn on Custom Error Messages in SharePoint 2007 you will need to follow these steps:
Logon to the SharePoint server hosting the site giving the error
Navigate to the root folder of the SharePoint site (Typically C:\Inetpub\wwwroot\wss\VirtualDirectories\sitename)
Find the web.config file and make a copy to a remote location (just in case you break it, you can fix it by simply pasting the file back to this location)
Open the file web.config (I opened mine in notepad but if you have another program you prefer use it)
Search for CallStack
Change CallStack to "true"
Search for AllowPageLevelTrace
Change AllowPageLevelTrace to "true"
Search for Errors
Change Mode to "On"
Save web.config
Close the file
Restart IIS
Now you should be able to go back to the SharePoint site that was giving you the generic error and now you should see a much more in-depth error message that you can actually use for troubleshooting the problem. Now you can start using the information from this new error message to track down what the real problem is with the page. This is much easier than trying to do a Google search for "An unexpected error has occurred".
It seems very strange for Microsoft to force the error page to display a generic error as the default method, but they did it for security purposes. If your SharePoint site is public and the error message is very specific about your server or domain and gives information that a possible hacker could use, it wouldn't be very secure. This is why it's not a good idea to leave the custom error messages on, once you get what you need, you should turn the custom error messages off. Only turn them on when you need to get more information.
Well I hope this guide helps you with your SharePoint 2007 site errors and you are able to turn the custom errors on!
Published by TechTips
I am a senior systems engineer and enjoy writing articles about computers, technology and other electronics. View profile
- Troubleshooting the Windows "Limited or No Connectivity" Error Sometimes you may get the error message "This connection has limited or no connectivity. You might not be able to access the Internet or some network resources." Here's how to fix it:
- FIX: Hal.Dll Is Missing or Corrupt Error MessageThis tutorial will show you how to fix the common error which leads to the infamous hal.dll miss or corrupt error message.
Error Code 9838 and the 3G iPhoneHigh numbers of new activations during the morning hours of the 3G iPhone's initial release have resulted in problems like error code 9838 preventing many users from activating...- What is a Win32 ErrorThe error is displayed upon startup of the computer and is caused by the downloading of security update 873333 (MS05-012), or from malicious software.
- How to Remove a "No Service" Error on an Unlocked IPhone 3GIt can be a headache after unlocking your iPhone 3G to get an error, particularly the "No Service" error that stops you from using your iPhone 3G. A few simple steps will have your iPhone 3G up and running in no time.
- Call of Duty: Black Ops Error Message Reported for Xbox 360 & PS3
- How to Get Rid of the Rundll32 Exe Error Message
- How to Fix Ntdll.Dll Error Message
- How to Fix Error Messages. (Part 1)
- How to Make an Error Message that Will Shut Down Your Computer!
- How to Fix the Dreaded "Read Error" Message on Playstation 2
- "Setup Cannot Copy the File Staxmem.Dll" Error Message




