I had a comment posted by Vince Rothwell of a suggestion for troubleshooting the type of errors described in my last posting and thought it was worth a full posting rather than getting lost in comments. Vince gave me a link to his blog at http://blog.thekid.me.uk/archive/2007/02/15/a-solution-to-quot-an-unexpected-error-has-occurred-quot-in-wss-v3.aspx where he describes making some changes to the web.config file for the application giving the error - so that you get a less generic error message. I tried this on one of my servers where I could "force" some typical errors of this type. Instead of the "unknown error" you get a stack trace which may give good clues to finding the true problem. In my cases one of the issues caused by some unexpected NULL values coming from the database gave a good indication that this was the problem - next step would be tracing where the bad data is. In another case I could see a "GeneralUnhandledException" so still needed to dig deeper. The final case gave me a specific GUID identifying the problem data element. So all in all a good way to troubleshoot these types of errors.
A couple of words of warning though - you probably don't want to do this for a public facing site - and even exposing your users to these types of errors is best avoided. One way to limit the viewing of these errors is to set custom errors to "RemoteOnly" rather than Off - which would then only give the full error details on the server (assuming you can repro on the server). The stack trace errors could tell a potential hacker more about your back-end systems than you would want them to know!
Thanks again to Vince - and please do visit his blog - a great source of excellent information on SharePoint!
Technorati Tags: Project Server 2007