Re: Refreshing an SL4 app (client problem?)
It's because the browser is caching the app, and your IIS probably doesn't set any cache expiry headers. Here's some info: http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-from-browser-cache-programmatically Chris On 8 September 2011 13:58, Greg Keogh wrote: > Well I should have asked my cat, because I browsed to the SL4 app from the > outside world and it was the latest version. When browsing from my work > machine I see the old version. So I restart my localhost IIS and delete > temporary files in the browser, but it makes no difference. As an > administrator I delete all local v2 and v4 ASP.NET temporary files and > restart IIS, now it’s fixed. > > ** ** > > So it looks like the problem was on my client side, not on the server > machine side. I’m not sure which step fixed the problem, but it *might* have > been deleting the local temporary files. > > ** ** > > Greg > > ___ > ozsilverlight mailing list > ozsilverlight@ozsilverlight.com > http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight > > ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
RE: Refreshing an SL4 app (client problem?)
Hi Greg, Funny, I was dealing with this today We handle this by having a version number in the xap filename (eg. SLAppName1.5.2.xap). This way whenever a new build goes on production, we know browsers will referencing the correct one. Simon. From: Chris Anderson [mailto:christheco...@gmail.com] Sent: Thursday, 8 September 2011 2:02 PM To: ozSilverlight Subject: Re: Refreshing an SL4 app (client problem?) It's because the browser is caching the app, and your IIS probably doesn't set any cache expiry headers. Here's some info: http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-f rom-browser-cache-programmatically Chris On 8 September 2011 13:58, Greg Keogh wrote: Well I should have asked my cat, because I browsed to the SL4 app from the outside world and it was the latest version. When browsing from my work machine I see the old version. So I restart my localhost IIS and delete temporary files in the browser, but it makes no difference. As an administrator I delete all local v2 and v4 ASP.NET temporary files and restart IIS, now it's fixed. So it looks like the problem was on my client side, not on the server machine side. I'm not sure which step fixed the problem, but it *might* have been deleting the local temporary files. Greg ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
RE: Refreshing an SL4 app (client problem?)
http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-from- browser-cache-programmatically Interesting ... some solutions are browser specific, some need code and maintenance. Adding the "Cache-Control: no-cache" header seems the easiest by far, so I'll try it out at the app level (it's under the IIS - HTTP Response Headers). I'm not feeling confident. Greg ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
Re: Refreshing an SL4 app (client problem?)
Ah didn't see this other thread. If you use the last modified time of the xap file then you will download the new version and if its updated then you automatically get the new one, but don't download it every time (which would happen if the url was different on every page load.) you only want the client to download it if the xap file has changed. put the modified date/time in the url and forget about it. move on to more interesting problems. :) On Thu, Sep 8, 2011 at 12:12 PM, Greg Keogh wrote: > > http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-from-browser-cache-programmatically > > > ** ** > > Interesting ... some solutions are browser specific, some need code and > maintenance. Adding the “Cache-Control: no-cache” header seems the easiest > by far, so I’ll try it out at the app level (it’s under the IIS – HTTP > Response Headers). I’m not feeling confident. > > ** ** > > Greg > > ___ > ozsilverlight mailing list > ozsilverlight@ozsilverlight.com > http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight > > ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
Re: Refreshing an SL4 app (client problem?)
+1 to Stephen I found this in my blog post draft folder <% const string filename = @"ClientBin/SilverlightApplication2.xap"; string version = (new System.IO.FileInfo(Server.MapPath(filename))).LastWriteTime.ToString("MMddhhmmss"); Response.Write(" "); %> http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0"; style="text-decoration:none"> http://go.microsoft.com/fwlink/?LinkId=161376"; alt="Get Microsoft Silverlight" style="border-style:none"/> And add at the top of that ASPX, in order to avoid caching of the hosting ASPX <% Response.Expires = -1; Response.AddHeader("Pragma", "no-cache"); Response.AddHeader("cache-control", "no-store"); %> .peter.gfader. (current mood = happy) http://blog.gfader.com On Thu, Sep 8, 2011 at 7:15 AM, Stephen Price wrote: > Ah didn't see this other thread. > > If you use the last modified time of the xap file then you will download > the new version and if its updated then you automatically get the new one, > but don't download it every time (which would happen if the url was > different on every page load.) > you only want the client to download it if the xap file has changed. put > the modified date/time in the url and forget about it. move on to more > interesting problems. :) > > On Thu, Sep 8, 2011 at 12:12 PM, Greg Keogh wrote: > >> >> http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-from-browser-cache-programmatically >> >> >> ** ** >> >> Interesting ... some solutions are browser specific, some need code and >> maintenance. Adding the “Cache-Control: no-cache” header seems the easiest >> by far, so I’ll try it out at the app level (it’s under the IIS – HTTP >> Response Headers). I’m not feeling confident. >> >> ** ** >> >> Greg >> >> ___ >> ozsilverlight mailing list >> ozsilverlight@ozsilverlight.com >> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight >> >> > > ___ > ozsilverlight mailing list > ozsilverlight@ozsilverlight.com > http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight > > -- .peter.gfader. Current mood = happy! Check this before you go live http://blog.gfader.com/2011/07/website-check-list-part-1-aspnet-4.html ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
RE: Refreshing an SL4 app (client problem?)
I have used this approach too. I actually have a Build.txt in the root of the application, and set the build number in the web.config and I use: App.xap?v=2.0.0.1 The query string difference is also enough to invalidate the cache, and it can be put into the build process easily and only invalidates on a new build. Regards, Jake Ginnivan Readify | Senior Developer | MVP (VSTO) M: +61 403 846 400 | E: jake.ginni...@readify.net<mailto:jake.ginni...@readify.net> | W: www.readify.net<http://www.readify.net/> From: ozsilverlight-boun...@ozsilverlight.com [mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Simon Hammer Sent: Thursday, 8 September 2011 12:07 PM To: ozSilverlight Subject: RE: Refreshing an SL4 app (client problem?) Hi Greg, Funny, I was dealing with this today We handle this by having a version number in the xap filename (eg. SLAppName1.5.2.xap). This way whenever a new build goes on production, we know browsers will referencing the correct one. Simon. From: Chris Anderson [mailto:christheco...@gmail.com]<mailto:[mailto:christheco...@gmail.com]> Sent: Thursday, 8 September 2011 2:02 PM To: ozSilverlight Subject: Re: Refreshing an SL4 app (client problem?) It's because the browser is caching the app, and your IIS probably doesn't set any cache expiry headers. Here's some info: http://stackoverflow.com/questions/2281919/expiry-silverlight-xap-file-from-browser-cache-programmatically Chris On 8 September 2011 13:58, Greg Keogh mailto:g...@mira.net>> wrote: Well I should have asked my cat, because I browsed to the SL4 app from the outside world and it was the latest version. When browsing from my work machine I see the old version. So I restart my localhost IIS and delete temporary files in the browser, but it makes no difference. As an administrator I delete all local v2 and v4 ASP.NET<http://ASP.NET> temporary files and restart IIS, now it's fixed. So it looks like the problem was on my client side, not on the server machine side. I'm not sure which step fixed the problem, but it *might* have been deleting the local temporary files. Greg ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com<mailto:ozsilverlight@ozsilverlight.com> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight