I have a Silverlight control packaged up and deployed to a SharePoint web part. I'm having trouble with the browser loading new versions of the control after I push an update. I'm updating the assembly and file version of my xap project, but it doesn't seem to matter. The only way to get the browser to load the new xap is to go in and delete temporary Internet files. For me, during development, that's OK, but I'll need to find a solution before it's time for production. Any ideas?
+5
A:
This has to do with how your browser handles resource requests. Flash has similar issues and there are a couple workarounds.
Here's an article that details the issue and possible solutions.
I would suggest doing something like this:
Say you have this for your xap in your html:
<param name="source" value="ClientBin/myApp.xap"/>
I would version it so whenever you do a push you change the version number. Example:
<param name="source" value="ClientBin/myApp.xap?ver=1"/>
Joseph
2009-11-12 14:43:43
Does that value associate back to the assembly version (i.e., 1.0.0.0)?
Chris Stewart
2009-11-12 14:53:33
@Chris no it's completely made up. You can put anything there, as long as you change it whenever you want to push the changes down to the client. Best Practice, though, might be to keep it in line with your versioning.
Joseph
2009-11-12 14:55:09
That did it, thanks for the suggestion.
Chris Stewart
2009-11-12 15:09:00
This didn't work for me. I solved it using this: http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-from-browser-cache-programmatically/2282163#2282163
Nelson Reis
2010-07-06 15:05:25