September 06
SharePoint Antipattern #76312
I came across this with a customer support issue this week. This is the WORST error handling EVER-- but hopefully posting this will help someone else, if not give you a chuckle.
So this is the message we get when SharePoint gets a FileNotFoundException when a web part referencing an assembly (such as the System.Web.Extensions.dll assembly) that cannot be found is added to a Web Part page. So…. If an AJAX Web Part is added and ASP.NET Ajax is not installed, SharePoint complains about the Closed web Parts Gallery:
What were they thinking????? What does the Closed Web Parts Gallery have to do with a FileNotFoundException???? (Many expletives were deleted from those last sentences...) Moral of the story: DON'T trust any error messages reported by SharePoint after some quick troubleshooting fails you. Use the Diagnostic Logging feature, and if you can get Microsoft Support to give you some ULS Viewer Tools (a friend showed me some) those will be quite useful.
And please, developers: don't catch errors and rethrow unrelated exceptions!!!!!