views:

142

answers:

1

I have a site that serves up a pretty substantial Silverlight RIA and it makes use of IsolatedStorage. The SL app is served up from https://www.site.com/Application (MVC View that hosts the SL object tags, etc). It is also served up from https://site.com/Application. The problem inherent in this is that this will create two separate IsolatedStorage application because the two host names are seen as different.

My first thought was to just serve the XAP file from an absolute link instead of a relative one:

<param name="source" value="http://site.com/ClientBin/app.xap" />

But this seemed to cause weird problems when the page was served from www.site.com and the xap was served from site.com.

My next thought was to leave it a relative link, but always do a permanent redirect (301) from www.site.com/application -> site.com/application to ensure that it is always served from the same location. Any thoughts or suggestions? Has anyone seen this?

A: 

You get "wierd problems" because the host page is served from a different site than the XAP hence access to the HTMLPage and attempts to call Javascript will fail.

The use of 301 doesn't change these conditions so you still have problems.

You will need to decide which site you want the application to run from and perform a redirect on for the entire page.

Personally if I were to build a substantial RIA application I would only allow it run from one site "site.com". I would create a "www.site.com" which redirects to the "site.com" that never actually serves any content just redirects.

AnthonyWJones
to be clear the 301 was for the whole page not just the xap file - but fundamentally I do like the whole site redirect as well. Thank you.
caryden