The CruiseControl.NET Monitor for Vista Sidebar is the first "real" Vista Sidebar gadget I developed, so I want to share 2 of the problems I encountered during the development.
The XmlStatusReport.aspx file that contains the report for the build server doesn't have an xml content-type (not text/xml, application/xml or with a .xml extension) but has, as any other html page, a text/html content-type. So I had to work around that CCNET bug (now fixed and available in the next version of CC.NET 1.3):
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
I read the responseText property and I create a new xml document from scratch using the XMLDOM object.
Then I encountered another problem: the XmlHttpRequest always returned the same data, even if the data had changed.
var now = new Date();
url = url+'/';
var finalUrl=url + "XmlStatusReport.aspx?sid=" + now.getTime();
This is not the best solution, since it uses both bandwidth and server processing time, but that seems to be an issue with the way IE implement caching, so not of easy solution.