Any smart client gurus??

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
 
N

name

GAC == General Average Certificate

You need to reinvent the broom outside your
little facist hegemonic world.
 
R

Reid Wilkes [MS]

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]

--------------------
 
K

Kellye Gaskill

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).
 
D

Dave

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top