Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Living with Live
Mike Taulty's Blog

Mike's Badges

Follow on Twitter
View mike's profile on slideshare
Add to Technorati Favorites
CW Blog Awards

I've been trying to use Live Services a little this week and I've been struggling somewhat and it seems to mostly come down to URLs.

I've got a Silverlight app which plays some videos. I don't want the burden of hosting those videos though for either streaming or download.

So...I figure it'll be easy. I can;

  1. Put the streamed videos onto Silverlight Streaming and stream them from there.
  2. Put the zipped videos for download onto SkyDrive and let people download them from there.
  3. Put the Silverlight application anywhere as it just needs to reach out to (1) and (2) above.

However, it's not so easy.

Whilst you can upload a video to Silverlight Streaming you can't so easily get a URL that links to the file you just uploaded. The URL for your video is actually quite a mangled thing and is prone to change so it's not as easy as just linking to it.

If you do host your Silverlight application on Silverlight Streaming then you can get around this because if you use the devlive:slscontrol you can use "magical" initParams values and if they contain URI's like this;

streaming:/myAccount/myFolder/myVideo.wmv

then they are translated before they hit your application by the infrastructure. Otherwise, it's pretty difficult. This is explained properly up here.

So..if I host both my application and my videos up on Silverlight Streaming then I'm ok. I can live with that :-)

However, my SkyDrive problem seems to have no solution right now. Essentially, all I want to do is upload a .zip file to SkyDrive and then get a URL for that uploaded .zip file. SkyDrive won't do this. What it does is to give you a URL to a webpage that will then let you download the .zip file. That's fine for a human in a browser but not so great if you're trying to download the .zip file from a piece of .NET code.

So, I gave up on using SkyDrive for my purposes which is a shame because "big store in the cloud" is exactly what I wanted.

For me - the upshot here is that if a user uploads a file to your service then they are very likely to want to be able to get a predictable URL to that file otherwise the value of the upload is reduced. I can appreciate that there might be good reasons for not giving the user a direct URL to their content but my view is that services are more likely to be adopted if they do.

Update 1: I'm not so sure that the devlice:slscontrol that I mentioned up above actually does the translation that I credited it with. I ended up using Silverlight.createHostedObjectEx and that worked better for me although at the time of writing I think I've hit a limitation as to how many initParams I can pass via this mechanism.

Update 2: Whilst I can get a URL from SkyDrive the "problem" I have is that if I upload foo.zip then I can't get a URL without visiting SkyDrive and right mousing on an item and then doing "copy hyperlink". That's ok for a manual process but it doesn't really work where you're trying to do something automated from a piece of code.


Posted Sun, May 4 2008 7:48 AM by mtaulty
Filed under:

Comments

SilverlightShow.net wrote SilverlightShow.net
on Mon, May 5 2008 5:57 AM
<p>I've been trying to use Live Services a little
Jason Haley wrote Interesting Finds: May 5, 2008
on Mon, May 5 2008 6:41 AM
zip code wrote zip code
on Mon, May 5 2008 11:53 AM
streaming videos wrote streaming videos
on Mon, May 5 2008 5:33 PM
Mike Taulty's Blog wrote 50 New Silverlight 2 Beta 1 Screencasts
on Thu, May 15 2008 2:34 AM
In my "spare time" I've been recording some screencasts about Silverlight 2 Beta 1 along with my colleague...
(C) Mike Taulty, 2009. All rights reserved. The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems