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?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Great! Worked even in Windows Phone development.
I've put the line:
And then Override the method
OnNavigatedTo
: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:
I would version it so whenever you do a push you change the version number. Example:
t’s not very uncommon to run into .XAP caching, which means that every time you deploy a new version of the Silverlight application, the browser does not download the updated .XAP file.
One solution could be to change the IIS properties. You can turn the “Enable Content Expiration HTTP header” option on for your .XAP file by following these step:
This way the latest .XAP (only if there is a latest .XAP file) will get downloaded when you refresh your page without having to close the browser.
Hope this helps!
The solutions mentioned here and other posts did not help me, consistently. What I did in the end was manually copy the .xap and the .svc files from my Release build to the ClientBin and Service deployment folders, respectively.
put the following web.config into ClientBin