In the early stages of SL beta 2 (and sometime after RTW's release, to my knowledge), it was possible to embed remotely hosted .xap's using the <object> tag, by specifying an appropriate URI in the "source" parameter, for example you could put the following
into a blog post on blogspot.com:
<object > .... <param name ="source" value ="http://someremotelocation.com/SilverlightApp.xap"> </object>
However, you can no longer do this as of some time last week, and you can only specify relative URI's or URI's on the same domain of origin, rather than absolute remote URI's. According to the MSDN description of the "source" value in the Silverlight tag,
"For security reasons, you cannot set the Source property to a URI that is not from the site of origin of the HTML page that hosts the Silverlight plug-in instance. Therefore, you should you should use only relative
references to specify a Source URI."
Is there any way to re-enable this functionality or somehow get around it? I am trying to make a compact and portable Silverlight app that can be easily deployed and / or embedded in a blog pointing to it remotely, and losing this functionality is a real
downer.
Perhaps an IFrame with a page as the source that contains the object tag and relative reference in? This is what they do on silverlight.live.com (which might also be an option for you)
Thanks for the reply, this indeed works. I was hoping not to have to resort to iframes (since the set of blogs that support <object> tags is, to my knowledge, bigger than those that support <iframe> tags), but this should be sufficient for now. I still
hope the source tag loses this restriction eventually though.
When you host the xap file on silverlight.live.com, you get many option on how to host the file on any aspx page or html. One of the generated code is iframe. Any one of the generated code by silverlight should work.
If this post was helpful then please 'Mark as Answer'
Sharker Khaleed Mahmud
Sr. Software Developer
(MCP,MCTS,MCPD[web])
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
card
Member
1 Points
3 Posts
Hosting Silverlight xap on a blog
Nov 03, 2008 05:13 PM | LINK
In the early stages of SL beta 2 (and sometime after RTW's release, to my knowledge), it was possible to embed remotely hosted .xap's using the <object> tag, by specifying an appropriate URI in the "source" parameter, for example you could put the following into a blog post on blogspot.com:
<object > .... <param name ="source" value ="http://someremotelocation.com/SilverlightApp.xap"> </object>
However, you can no longer do this as of some time last week, and you can only specify relative URI's or URI's on the same domain of origin, rather than absolute remote URI's. According to the MSDN description of the "source" value in the Silverlight tag, "For security reasons, you cannot set the Source property to a URI that is not from the site of origin of the HTML page that hosts the Silverlight plug-in instance. Therefore, you should you should use only relative references to specify a Source URI."
Is there any way to re-enable this functionality or somehow get around it? I am trying to make a compact and portable Silverlight app that can be easily deployed and / or embedded in a blog pointing to it remotely, and losing this functionality is a real downer.
embed deploy 2.0 Silverlight hosting Silverlight hosting remote Silverlight 2 Silverlight 2 RTW
IanBlackburn
Contributor
2333 Points
371 Posts
Re: Hosting Silverlight xap on a blog
Nov 03, 2008 05:30 PM | LINK
Perhaps an IFrame with a page as the source that contains the object tag and relative reference in? This is what they do on silverlight.live.com (which might also be an option for you)
Example from Silverlight Streaming:
<iframe src="http://silverlight.services.live.com/invoke/173/Silvelright%20Image%20resize/iframe.html" scrolling="no" frameborder="0" style="width:500px; height:400px"></iframe>
Cheers
Ian Blackburn
SilverlightForBusiness.net
card
Member
1 Points
3 Posts
Re: Re: Hosting Silverlight xap on a blog
Nov 03, 2008 05:50 PM | LINK
Thanks for the reply, this indeed works. I was hoping not to have to resort to iframes (since the set of blogs that support <object> tags is, to my knowledge, bigger than those that support <iframe> tags), but this should be sufficient for now. I still hope the source tag loses this restriction eventually though.
shamrat231
Star
10748 Points
1283 Posts
Re: Hosting Silverlight xap on a blog
Nov 10, 2008 02:15 AM | LINK
When you host the xap file on silverlight.live.com, you get many option on how to host the file on any aspx page or html. One of the generated code is iframe. Any one of the generated code by silverlight should work.
If this post was helpful then please 'Mark as Answer'
Sharker Khaleed Mahmud
Sr. Software Developer
(MCP,MCTS,MCPD[web])
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
Sharker Khaleed Mahmud
Follow me on Twitter :: www.silverlightips.net