Sometime if our support response emails to clients could be blogged I think the world would be a better place and global IT communities could sleep better at night or get some sleep.
Unknown Error has occurred is often found nested in a typical SharePoint page when something with your configuration has gone wrong. Could be a SQL connection, Web.Config setting, SharePoint setting, could be a UFO passing over you – could be anything right.
Here’s how to get rid of it and see an unfriendly error message (it’s been blogged many times before I’m sure, but here’s my explanation):
a) Locate the web.config of your primary SharePoint application on your server file system. Can often be found at[drive]:\Inetpub\wwwroot\WSS\VirtualDirectories\[app name]\Web.Config
b) Save another copy of the Web.Config for backup purposes
c) Open in Notepad or an editor of your choice and locate the following line element:
d) Change the CallStack from “false” to “true”
e) Then find customErrors element and change its mode from “On” to “Off”
f) Save and Close
g) You may need to Run IISRESET /noforce
h) Run that page again
Good idea to change it back after development or resolution.
Over n Out
POST UPDATE:
Thanks Zlatan for pointing out that the I ommited to add the
<compilation batch="false" debug="false">
should indeed be set to
<compilation batch="false" debug="true">
What does this do? It's allows you to set the ASP.NET debug if you need to figure out why your custom Webpart is throwing errors.
I'd suggest these settings be applied after install for your development server.
Thanks again Zlatan
Cheers for now...