Archive for the ‘Vista’ Category

KPI viewer Vista gadget development on Windows 2008 64Bit

November 18th, 2008 by koolb | No Comments | Filed in .NET, Business Intelligence, Programming, Sharepoint, Software Development, Vista, Windows

I wanted to display some KPIs as a vista gadget. I had to use the PC which I already setup SQL SERVER, MOSS and PPS on a Windows 2008 Server. I googled to find a way to setup Vista sidebar on Windows 2008 and found a great post from reggies blog with simple instructions. Sidebar worked like a charm on Windows 2008 after following the instructions on the reggies blog.
I also found a sample Vista gadget code from hanselman.com. Download and copy the code to gadget directory and add the gadget to the side bar. The method he has followed is to get the RSS feed from Sharepoint KPI List and setup the feed URL through the options dialog. After setting up the RSS feed the options dialog, it displayed the message “connecting” but nothing happened. I went through the Javascript code and couldn’t find any problem. Next, I setup the same gadget on a Vista Box and it worked without a problem.
I identified the problem is in the Windows 2008 and looked for a way to debug the code. Vista Gadgets cannot be debugged in a normal way and I found some good information fromĀ Keith Elder’s blog and howtogeek.com on setting up the debugging. When I debug, the problem was in the line where the XMLHttp.open ” g_XMLHttp.open(‘GET’, g_WsUrl + “&kalle=1234″, true);” and it was throwing an exception saying “Microsoft JavaScript runtime error: Permission denied”. But everything was fine on IE and there cannot be a problem with JavaScript engine. so I looked google for a solution. Couldn’t find the exact solution but some one has resolve the issue by coping vista gadget files to a FAT partition and coping them back to NTFS partition. I understood that the issue is not in the JavaScript but with file permissions. When I right click on the files and I got the following dialog.

Windows File Properties - UnBlock Button

I saw something different as there is a Unblock button. I pressed the Unlock button for the all the files related to Vista gadget and retried again. This time it work with out a problem. This is the first time I have come across the “Unblock” button scenario. I found some information on the “Unblock” functionality after some searching. If you get “Microsoft JavaScript run time error: Permission denied” again, don’t forget to check file permissions first, specially on Windows 2008 and Visa.