Silverlight Streaming: Careful with that application’s name!

.NET, Silverlight, Technical stuff, WPF
See comments

I lost some time today with that error, so be careful what you name your Silverlight Streaming application!

Silverlight Streaming is a service offered by Microsoft, 4 GB of storage for your Silverlight applications, which will usually be used for streamed videos. When you create a Silverlight Streaming application, you may name it anything, and apparently the name is not validated. In my case, I thought I’d be clever, and I named my first application 2007070201MumbaiPuneTraffic, with the string “2007070201” being a unique identifier (7th of July 2007, application number 01).

However, this causes issues: A JavaScript variable is created to store the reference to the DIV hosting the Silverlight plug-in. Expression Media Encoder gives that JavaScript variable the exact same name as the Silverlight Streaming application (actually, they add the suffix “Wrapper”; so in my case, it was “2007070201MumbaiPuneTrafficWrapper”). However, a JavaScript variable’s name may not start with a number! So I kept getting script errors, until I figured what was going wrong.

As a quick workaround, renaming that JavaScript variable worked, and I could enjoy my video. In the future, however, I’ll make sure to use a different naming convention, in order to avoid this kind of issue.

This post was imported from my old blog. Original comments screenshot:


Previous entry | Next blog entry

Comments for Silverlight Streaming: Careful with that application’s name!