| Comments

In my previous post about cross-domain policy files I received some comments about whether or not cross-domain access is allowed on Silverlight Streaming.  I think really this is two questions that I'll try to clarify here.

What is Silverlight Streaming?

For those who don't know, Microsoft provides anyone with an account to "stream" Silverlight applications for free.  We'll give you 10GB of space to put your Silverlight applications.  There are some limitations, which you can read about in the service.  The "streaming" name has confused some.  It isn't only a "where can I put media files" location, but is a service to "stream" your entire Silverlight application.  You can have a media player, or a hello world textbox...no matter.  If you haven't checked it out, sign up.

Does Silverlight Streaming support cross domain calls from Silverlight?

This really has to do with the Silverlight Streaming API.  Silverlight Streaming provides an API to manage your applications.  You can perform various activities on your Silverlight Streaming account through this API such as managing your applications, requesting files, etc.

Now I'm not sure why you would want to access the API from a Silverlight application, but I will say that the in order for this to happen (as noted in my post about cross domain access), the service would have to host a policy file at the end point.  Silverlight Streaming currently does not have that policy file.

Can my application hosted in Silverlight Streaming access cross domain services?

This is what I think the question really is in the comments.  Yes.  Provided that the service you are accessing has a clientaccesspolicy.xml file at the root of the site, then yes it could.  I whipped up a quick DataGrid sample and put it on my Silverlight Streaming account.  This is a Silverlight 2 application (xap) that calls the MSN Video POX service via a WebClient call.  I take the information and bind it to a DataGrid.  So this application below is hosted in Silverlight Streaming, calling a 3rd party service (which has a policy file enabled) and embedded within my blog post here.

I hope that makes it a little clear that yes you can do this with your apps.

How did you get a Silverlight 2 application on Silverlight Streaming?

Very easily.  Just a bit after MIX08, the SLS team added support for Silverlight 2 Beta 1 applications.  You can read about it here, but here is the manifest I used for the application you see above:

<SilverlightApp>
   <version>2.0</version>
   <source>StreamingCrossDomain.xap</source>
</SilverlightApp>

I added that manifest.xml and my StreamingCrossDomain.xap file to a zip, uploaded it to my account and done.

Hope this helps!

Please enjoy some of these other recent posts...

Comments