I have got a live testing version of a SharePoint 2010 based room & reservations bookings template (which I promise I will one day finish!).
Randomly, users were getting an error on their screens though.Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
The Correlation ID here, when looked up in the log files (c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS\) takes me to a 4 line description which starts:Error while executing web part: System.StackOverflowException: Operation caused a stack overflow.
It turns out, that since the August 2011 Cumulative Update for SharePoint 2010, there is a timeout put on XSLT Transforms. My page in particular uses these transforms to draw the timeline of what rooms are available when. As far as I know this only affects DataViewWebParts.
In order to overcome this, after installing the February 2012 Cumulative Update for SharePoint 2010 you can configure this timeout period. This can be done by running the following commands at the SharePoint PowerShell prompt.
$myfarm = Get-SPFarm $myfarm.XSLTTransformTimeout = 5 $myfarm.Update()
The page now appears correctly for everyone!
Note: The brackets at the end of the Update() line are essential. If you don’t put them in then the changes you make will not save. If you want to check that your change has been saved then enter the following two commands, and your new timeout will be shown.
$testfarm = Get-SPFarm $testfarm.XSLTTransformTimeout
If you have particularly complex and involved XSLT then you may need to increase the timeout further. For the application that I was working on, 2 seconds worked for all users except for 1 time. We set it as 5 as a fail safe, as generally people will be happier with it working and waiting an extra second. If you go too high though, then you may be compromising the users experience, and should probably look at optimising your code, or creating a sub-class for the code as per the Microsoft KB: http://support.microsoft.com/kb/2639184