Any smart client gurus??

  • Thread starter Thread starter Zach Martin
  • Start date Start date
Z

Zach Martin

Working on developing a smart client application and I am trying to get past
one nasty stumbling block. Hoping someone with previous smart client
deployment experience can steer me in the right direction. My problem is as
follows:

I need to better understand how to have my launcher or stub app load local
versions of a given assembly from the downloaded application cache of the
GAC when the remote web server is offline. I am using the Assembly.LoadFrom
method to load assemblies and have that workng fine when the web server
hosting the assemblies is accessible. However I have not been successful in
getting my application to load/use a local version of the assembly when the
web server is down or stopped. I'm unsure as to what code I should be using
to have load my assemblies directly from the downloaded/application cache of
the GAC. Any help would be appreciated.

Zach Martin
 
GAC == General Average Certificate

You need to reinvent the broom outside your
little facist hegemonic world.
 
Hi Zach,
Unfortunately using the download cache as you described is not possible. It
is not meant to be a place where web-deployed applications can be run even
when the server is down. The fact that the download cache exists is really
an implementation detail of fusion rather than a feature to be relied upon.
Your best bet is to follow the example of the "Application Updater"
component on GotDotNet - explicitly copy all application files to the local
machine and only download from the server to obtain updates to the
application. Otherwise, you are reliant upon the web server being up.

Hope this helps,
Reid [MS]

--------------------
 
The GAC is NOT the same as the dowloaded application cache. Your assembly
will not be in the GAC unless you installed it there with a setup program
(as opposed to "no-touch deployment"). I don't think you can depend on your
program being available in the downloaded application cache, since the cache
can be cleaned automatically. If you need the executable to be available
when the web server is not, you will probably need to deploy the assemblies
to the client computers, using an MSI or xcopy (as opposed to just launching
from a web page).
 
One technique you can use to run the code when the server is offline is to
write code that copies the bits (all assemblies and related files) from the
server to a directory on the local machine. You can then use Load or
LoadFrom using the local directory instead of the remote web server. This
will require your app to have elevated security privileges (to copy the
files), and it will change the security context in which the assemblies
execute from Internet or Intranet zone to LocalComputer (potentially
dangerous as malicious code can execute with more rights).
 
Back
Top