Skip to main content

Microsoft Silverlight

Unanswered Question Does Isolated Storage Work With Silverilght StreamingRSS Feed

(0)

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Does Isolated Storage Work With Silverilght Streaming

This is a follow up to a post a made a couple days ago. This is a show-stopper for me so I wanted to ask the question directly. 

I have an application hosted on Silverlight Streaming.  I use Isolated Storage to store application settings.  The isolated storage seems to get "lost" everytime Silverlight Streaming serves my app from a new hostname. (I assume this new hostname is generated whenever the applications falls out of the "Edge Cache" and has to be re-served.)

 Below are the contents of 2 seperate versions of "id.dat" for the SAME application.  This is after I cleared all my Isolated Storage and ran the app over a period of time.

HTTP://MSBLUELIGHT-0.AGAPPDOM.NET/E1/D/58799/13251505/63355838400/0.YE5-XFNSCYJBK1DKPPLS8-OFUT0/DIVERGAME4.XAP

HTTP://MSBLUELIGHT-0.AGAPPDOM.NET/E1/D/58799/13251505/63355845600/0.GSVFMGYV9L_UICCCGDRF5PJF_JU/DIVERGAME4.XAP 

 To the users of my app, it appears as though they lost all their saved settings.

 Could someone confirm that this is the expected behavior or a bug?  Is there a way around this. Isolated storage is very necassary for my app. 

 Thanks. 

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Does Isolated Storage Work With Silverilght Streaming

Anyone?  I really need to get this figured out.  I really don't want to give up using Silveright Streaming but I need Isolated Storage.

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Does Isolated Storage Work With Silverilght Streaming

Beuler?

MarauderzMY
MarauderzMY

Member

Member

597 points

258 Posts

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Yeah, for some reason the SLS people don't seem to be drop by frequently here. But you have an interesting problem and I wonder how it can be solved since the nature of

heuertk
heuertk

Participant

Participant

1368 points

422 Posts

MicrosoftModerator

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

 Hey guys, this is a great find!  yes, this would be an issue because the IsolatedStorage settings relies on the URI of the XAP to mark it's storage uniqueness (so other XAPs can't write to the same store).

 I'll ping the SLS guys to see what they can do architectually about this.

-th
http://timheuer.com/blog/

-----

If this answered your question, please be sure to click the 'mark as answered' feature, otherwise please feel free to post follow-up questions that are related.

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Thanks Tim! 

 Look forward to a solution to this. (crosses fingers...)

WilcoB
WilcoB

Member

Member

672 points

117 Posts

Re: Does Isolated Storage Work With Silverilght Streaming

This is an interesting problem, and not one I personally had considered. The behavior is by-design as I'll explain in a bit. The closest alternative you can consider is using site-level isolated storage instead of application-level isolated storage. However:
1. If SLS's subdomain is variable too (e.g. your app is occasionally served from msbluelight-1.agappdom.net instead of msbluelight-0.agappdom.net), then you still have the same problem.
2. Other apps on the same subdomain will have access to the data you stored in your isolated store.

To give you a little more background, consider some of the following scenarios:
1. A page contains two Silverlight apps, a main app and an advertisement (probably served from some other domain). The ad really shouldn't have access to the main app's isolated store.
2. Two websites running on the same domain, e.g. user1.asp.net and user2.asp.net or asp.net/user1 and asp.net/user2. For security reasons it's important that both users can be guaranteed that their isolated store can only be accessed by themselves.
3. Two applications running in a single site want to share data, e.g. asp.net/forums and asp.net/contact may both want to access the same isolated store.

We addressed these 3 scenarios using the design we have today: each XAP gets its own isolated store (based on its URL) and each XAP gets access to a shared isolated store (sharing occurs at the subdomain level).

I'm not sure I see how we could preserve the scenarios above while also supporting yours. If we allowed a page to specify an identity of isolated storage, then nothing would prevent a XAP on asp.net/user1 to use an identity used by asp.net/user2.

Does that make sense?

I wonder if perhaps you should consider storing the data on a server. Not sure if you can do that with SLS, and not sure if you'd want to store it on your own server either.

- Wilco Bauwer (MSFT) / http://www.wilcob.com

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Does Isolated Storage Work With Silverilght Streaming

Thanks for responding, Wilco. I think I follow.

 I guess I'm not looking for Silverlight itself to change, I'm looking more for a response from the Silverlight Streaming team.

 I guess the only solution would be for Silverilght Streaming to somehow always server my .xap file from the same host name.

 I can't help thinking Silverlight Streaming will be pretty limited for applications if it's not possible to utilize Isolated Storage.

 I can't store this info on the server because I don't require registration to play my game.  I need to store the info on the players machine.

 Can anyone from the Sivlerlight Streaming team speak to this issue?

Priyamjm
Priyamjm

Member

Member

234 points

32 Posts

Re: Re: Does Isolated Storage Work With Silverilght Streaming

Most likely Silverlight Hosting server is a web farm. So there are more then one server boxes available to server your request. And this isolated storage is local to these server boxes. My advice is, it is not a good idea to store something on server isolated storage (since you do not have control on these temp folders (isolated storages). You could do this if your are hosting your app to your hosted server). -Priyakant Patel

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Well the actual things being stored are stored on the Client.  It's just the hostname tie-in that makes it not work.

 I still think it's somewhat limiting to not be able to use Silverlight Streaming and isolated storege together.

 Currently I do host my game from my own server but Silverlight streaming will eventually be offering pre-roll ads for applications and I'd like to be a part of that. (currently they do it just for video)  As it stands, I will not be able to use Silverlight Streaming with my games as most of them will require some sort of client side isolated storage.

heuertk
heuertk

Participant

Participant

1368 points

422 Posts

MicrosoftModerator

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

 Jeff, I've put a note in to the SLS team to see what any future plans are going to be to accommodate this.  When I hear anything I'll report back here.

-th
http://timheuer.com/blog/

-----

If this answered your question, please be sure to click the 'mark as answered' feature, otherwise please feel free to post follow-up questions that are related.

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Ok, thanks again Tim.

 Looking forward to what they have to say.

leo.may
leo.may

Member

Member

2 points

8 Posts

Re: Re: Does Isolated Storage Work With Silverilght Streaming

3. Two applications running in a single site want to share data, e.g. asp.net/forums and asp.net/contact may both want to access the same isolated store.

can any one help me doing this? In one silverlight app, i am storing an object in Iso storage and in other silverlight app i am trying to use that.but it always says, it can't find the key i mentioned.

Does two silverlight apps share same Iso storage ?

Thanks

heuertk
heuertk

Participant

Participant

1368 points

422 Posts

MicrosoftModerator

Re: Re: Does Isolated Storage Work With Silverilght Streaming

 leo -- in the example you have above, the SiteSettings would share the same store, but the ApplicationSettings are unique to the application.

-th
http://timheuer.com/blog/

-----

If this answered your question, please be sure to click the 'mark as answered' feature, otherwise please feel free to post follow-up questions that are related.

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Now that Silverlight 2 is out and Streaming has been updated to work with it, can anyone tell me if the issue with Isolated Storage has been addressed?

I don't think I ever did hear from anyone on the Silverlight Streaming team on this. 

 

APIJunkie
APIJunkie

Member

Member

26 points

13 Posts

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

I completely agree with Jeff that Isolated storage should be made available when using streaming.

For this reason and others, even just for the sake of usage simplicity, resources should have fixed Uri's.

The load balancing scheme could be made transparent by using some DNS sleight of hand.

One way to do this is to make the DNS servers return different IP addresses to different clients according to their global IP position.

This has been done before on a large scale by services like the AKAMAI content network.

In any case Jeff, if you still want to use streaming and if you don't worry about performance too much, how about using a second Silverlight utility application as a proxy to access the local storage.

Meaning another Silverlight application would sit on the same page as the streamed one and act as an isolated storage proxy service.

The 2 applications will communicate with each other by exposing interfaces and using the html bridge (you will also need to enable ExternalCallersFromCrossDomain).

Check out this article about Browser Interoperability In Silverlight 2 for some more info.

JeffWeber
JeffWeber

Member

Member

139 points

92 Posts

Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Hi APIJunkie,

 I never thought of using a seperate SL app as a proxy to Isolated Storage.  A bit of a hack, but it's better than nothing.  This would work for my games that I host on my own site and it would save me some bandwidth and would allow me to tie into the Silverlight Streaming ad-service. (if/when they release an ad service for apps)

 My ultimate goal, however, is to allow other websites to easily host my games.  If I could do this using Silverlight Streaming, then the streaming ads would follow the game wherever it was hosted. (kinda like www.mochiads.com). Unfortunately, the proxy idea wouldn't work as well in that scenario as it would require too much work on the part of the hoster.

 I still am a bit suprised there has been no response from the Silverlight Streaming team on this. I can only assume that means they have no solution for this.

 I'll keep waiting . . .

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities