The problem is this: when you call Assembly.LoadFrom, the loader has no way of knowing if its cached copy is up to date. So it has to go to the web server to check if it has changed. If it hasn't it will then run with the cached copy. Problem is, it still needs to be able to connect to the web server to detect a change.
It's different if you do an Assembly.Load - if you pass in a fully-qualified assembly name (i.e. everything - name, version, culture, public key token) it can know whether the version in the cache is the one you require or not. (It doesn't matter if it's the latest - so long as it's what you asked for that'll do fine.) And likewise with any other mechanism that passes a fully-qualified name into the assembly resolver, i.e. any references your component has to other components will typically not require a round trip to the server. The problem is Assembly.LoadFrom only specifies a codebase, not a full name. So it has to hit the web server to find out whether it needs to download a new copy. -- Ian Griffiths DevelopMentor ----- Original Message ----- From: "Joe Duffy" <[EMAIL PROTECTED]> > I am unable to find any good, thorough documentation on the implementation > of smart clients (in particular, those that are offline capable). Does > anybody out there have internet or book references that may be helpful in > this area? > > Specifically, I am able to remotely load assemblies > (Assembly.LoadFrom(...)), but I was under the assumption that downloaded > assemblies would be cached for future offline uses. When I attempt to run > the application again after terminating my network connection, however, it > does not pick up the cached version. Is there a separate invocation that > will load an assembly from cache, after which (if it fails) I can load it > from the remote location? Am I limited to manually doing this? If so, I'm > not sure that my technique that I have in mind is very efficient -- > especially over a low bandwidth connection (copying the DLL locally, > catching "FileNotFoundException" thrown by Assembly.LoadFrom(...) to signify > lack of a network connection, and loading it from the local copy if > unavailable). > > Any assistance would be greatly appreciated. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.