Accessing the Download Cache

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:
gacutil -ldl
Microsoft (R) .NET Global Assembly Cache Utility. Version 1.0.3705.0
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?
 
M

Morten

Hi,

I would like to know wether you have solved the problem or not, because I
have the exact same problem...

best regards Morten
 

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