“An unexpected error has occurred”: the sharepoint developer nightmare

24 04 2008

If you are developing with WSS/MOSS, this is a known message. A lot of unexpected errors are displayed simply as “An unexpected error has occurred.”. Some of them you can debug in the sharepoint log files, some of them you can find details in the event log, and some… you can’t find anything… those are pure and simple desperation until you hit with your head enough times to almost develop a 6th sense; with this sense you start guessing where the problem comes from.

The biggest problem about this type of errors is that the debug process is VERY time consuming.

Well, today I came across a very smart approach for this problem. You just implement a HTTPModule that catches the exception prior to being treated by MOSS and logs it where ever you want.

This great approach was developed by Janne Mattila  and you can find the full post here: http://blogs.msdn.com/jannemattila/archive/2008/02/04/catching-unhandled-exceptions-in-sharepoint.aspx

Great work!


Best Practices for Speeding Up Your Web Site

22 04 2008

This is an article with a lot of common scense and doesn’t apply directly to WSS/MOSS but to all web sites. A must read. You can find it here: Exceptional Performance : Best Practices for Speeding Up Your Web Site.

Here is a snipet:

(…)The Exceptional Performance team has identified a number of best practices for making web pages fast. The list includes 34 best practices divided into 7 categories.

  1. Make Fewer HTTP Requests
  2. Reduce DNS Lookups
  3. Avoid Redirects
  4. Make Ajax Cacheable
  5. Post-load Components
  6. Preload Components
  7. Reduce the Number of DOM Elements
  8. Split Components Across Domains
  9. Minimize the Number of iframes
  10. No 404s



18 04 2008

A couple of days ago a fellow Sharepointer entered the non existence phase. In his memory I leave a profound scream: ask for help if you need it; Always be there for those who do so!

RIP Miguel…

Getting rid of a broken webpart

7 04 2008

Sometimes (more frequently than I could wish for) a webpart brakes a page and stops you from editing any further. If you find yourseft in such a situation, add the string “?contents=1” as in http://mysite/somepage.aspx?contents=1. This will lead you to the webpart deactivation page where you simply disable/remove the broken webpart.