开发者

xap not refreshed in Chrome

I've just updated my xap application, the changes are reflected as expected in IE. However, in Chrome, I can see it is still the old design. In VS2010 I've tried recompiling after unticking 'Reduce XAP size by using application l开发者_C百科ibrary caching' but no changes I'm not sure what other information I should provide to get help - feel free to ask questions! Thanks

EDIT: If I use the incognito mode in Chrome, the xap displayed is the latest version, so it clearly seems to be a problem in Chrome. However the users of my website can't know that, how can I circumvent the bug? I'm using Chrome 10.0.0.648


At least this solution works with Firefox.

Add an empty parameter (?refresh in this case) to the source of the xap-file on the page with object tag and silverlight application:

<object id="slPlugin" name="SilverlightApplication" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
    <param name="source" value="ClientBin/SilverlightApp.xap?refresh"/>


As far as your application is versioned you can use the following solution which force the refresh as the url changes with the version number :

var versionNumber = Assembly.GetExecutingAssembly().GetName().Version.ToString();

<object data=\"data:application/x-silverlight-2,\" type=\"application/x-silverlight-2\" width=\"100%\" height=\"100%\" id=\"slobj\">
<param name=\"source\" value=\"ClientBin/Application.xap?" + versionNumber + "\"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜