M
Matt Giedt
I have an application that uses Assembly.LoadFrom to successfully
instantiate a dynamic assembly that lives on a web server. For
architectural reasons I would rather not create a reference to the
external assembly. The assembly, and all other assemblies that it is
dependent upon, is placed into the local download class when the
application is started for the first time, and the computer has an
empty download cache. This is verified by running:
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
The cache of downloaded files contains the following entries:
common, Version=1.0.0.35263, Culture=neutral,
PublicKeyToken=6a8177ec3babee2f, Custom=null
etc.
The URL that the assemblies came from is:
http://localhost:8082/client/client.dll
Now, I unplug my laptop from the network, and I still expect the
application to run, using the latest assembly. I have tried every
combination of:
Assembly.Load, Assembly.LoadFrom, Assembly.LoadWithPartialName
with and without using Evidence. I cannot load the assembly that is
sitting in the download cache.
So, here are my questions:
1. Is it possible to pragmatically access the download cache? How?
2. Can you pragmatically add an assembly to the GAC?
3. Is there a better way to do this?
instantiate a dynamic assembly that lives on a web server. For
architectural reasons I would rather not create a reference to the
external assembly. The assembly, and all other assemblies that it is
dependent upon, is placed into the local download class when the
application is started for the first time, and the computer has an
empty download cache. This is verified by running:
Microsoft (R) .NET Global Assembly Cache Utility. Version 1.0.3705.0gacutil -ldl
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.
The cache of downloaded files contains the following entries:
common, Version=1.0.0.35263, Culture=neutral,
PublicKeyToken=6a8177ec3babee2f, Custom=null
etc.
The URL that the assemblies came from is:
http://localhost:8082/client/client.dll
Now, I unplug my laptop from the network, and I still expect the
application to run, using the latest assembly. I have tried every
combination of:
Assembly.Load, Assembly.LoadFrom, Assembly.LoadWithPartialName
with and without using Evidence. I cannot load the assembly that is
sitting in the download cache.
So, here are my questions:
1. Is it possible to pragmatically access the download cache? How?
2. Can you pragmatically add an assembly to the GAC?
3. Is there a better way to do this?