Skip to main content
I had a great chance to write some kick ass Silverlight code last week as a proof of concept for a potential new business venture the company I work at is thinking about, and hopefully in 6 months to a year I will be able to talk about it. The final solution won’t be Silverlight based but for the POC it provided the delivery method, functionality and UI that gets the message across.

image

Part of that POC was to be able to have a local XML file (local as on the server) loaded when the application was open and parsed. So the only way to do that is to use the WebClient class and call the DownloadStringAsync method with the URI to the XML file and then parse that in an XDocument. Not rocket science at all, but when I tried it I kept getting a message “An exception of type ‘System.NotSupportedException’ occurred in System.Windows.dll but was not handled in user code Additional Information: Specified method not supported.”

No matter what I tried I could not get it to work :( Eventually I figured out that it only was occurring when debugging/running from within Visual Studio. Publishing it to an actual web server and running it as a user would worked perfectly. This is a big issue for me, since it makes ad-hoc testing and debugging very difficult. Thankfully for me it was just a POC, but this could be a big pain for serious projects.