locked
Disabling SilverLight client automatic updates RRS feed

  • Question

  • We know that when a OOB LightSwitch client starts, It checks the publishing application web server for any available update, using the actual client xap timestamp; if an update is detected, the client downloads it as 'update.xap', asks to restart and prior restarting replace the xap file (plus a couple of other files like metadata file).

    We also know that the update check works as follows:

     - when client is starting, it issue an http GET to the publishing web server for the xap file with the http header 'last-modified-since' valued with the client timestamp

    - if the xap file it is not updated, the web server should responde with the http status 304, otherwise should responde with the xap file ad status code 200

    - if the client receives 304 as response status code, it starts the actual version; in the other case it starts the auto-update mechanism

    We have the following problem: on a our customer network, for some reason (most probably due to a particular configuration of some proxy server), the 'last modified since' http header is removed prior to reach the publishing web server; so, the http get for 'app.xap' always returns 200 status ok and so, the client always get an update. The application never starts because always download the update and asks to restart to apply them.

    While we are waiting the IT specialists of out customer solve the problem, we would like to temporaly disable the automatic update process (client side), in order to bypass the forever looping auto-update phase.

    Is there any way to achieve this?

    Thank you.


    Robin Poltronieri

    Monday, January 27, 2014 10:48 AM

Answers

All replies

  • Hi Robin,

    Unfortunately, LightSwitch doesn't expose a way to disable this.

    Tim

    Friday, February 14, 2014 9:18 PM
  • Quite by accident, I have discovered a means to bypass the results of the auto-update check.

    I was debugging why, after an update on the server side, one client reported it needed the update, and the client on the adjacent PC simply ran the old client against the new server code.  I determined that the 'metadata' file in

    %USERPROFILE%\AppData\Local\Microsoft\Silverlight\OutOfBrowser\your_app_folder\

    was missing the line that contained "XapLastModified" and its associated value.

    I copied this line from the file that had it to the one that didn't, and my app started to report that it needed to be updated.

    Therefore, in reverse, if you remove the "XapLastModified" line from the metadata file in that app's folder, it will continue to run the application.  I wouldn't be surprised if this turned out to be the cause of your issue too, where the value for this may be forward of the date on the Xap file itself.

    Note that if you want to manipulate this on an enterprise scale, that metadata file is in the user's profile, so it's per user, per computer.  So you'd really need some major tools to manage it...roaming/mandatory profiles, group policy, Configuration Manager, etc.

    I hope this information is helpful.


    • Edited by TFS-Keith Friday, October 2, 2015 2:09 PM
    Friday, October 2, 2015 1:58 PM