Page view counter
Does Isolated Storage Work With Silverilght Streaming
Last post 11-18-2008 2:05 PM by JeffWeber. 14 replies.
Sort Posts:
09-03-2008 5:52 AM
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. 

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
09-04-2008 12:32 PM
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.

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
09-08-2008 1:37 PM
Re: Re: Does Isolated Storage Work With Silverilght Streaming
JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
09-08-2008 11:00 PM
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

MarauderzMY

Loading...
Joined on 05-03-2007
Posts 161
09-25-2008 9:56 PM
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.

heuertk

Loading...
Joined on 06-20-2002
Queen Creek, AZ
Posts 337
09-26-2008 8:38 AM
Re: Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Thanks Tim! 

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

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
09-26-2008 5:58 PM
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

WilcoB

Loading...
Joined on 03-02-2003
Posts 97
09-28-2008 9:17 PM
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?

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
10-06-2008 7:05 PM
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
Priyamjm

Loading...
Joined on 09-23-2008
Posts 28
10-06-2008 9:00 PM
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.

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
10-06-2008 10:34 PM
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.

heuertk

Loading...
Joined on 06-20-2002
Queen Creek, AZ
Posts 337
10-07-2008 8:26 AM
Re: Re: Re: Re: Does Isolated Storage Work With Silverilght Streaming

Ok, thanks again Tim.

 Looking forward to what they have to say.

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
11-05-2008 12:27 PM
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

leo.may

Loading...
Joined on 11-04-2008
Posts 8
11-05-2008 2:23 PM
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.

heuertk

Loading...
Joined on 06-20-2002
Queen Creek, AZ
Posts 337
11-18-2008 2:05 PM
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. 

 

-Jeff Weber
Physics Powered Games - Physics Games for the Web
Farseer Physics Engine - 2D Physics Engine for Silverlight and XNA

JeffWeber

Loading...
Joined on 09-07-2007
Appleton, Wi
Posts 71
Microsoft Communities