Groups | Blog | Home
all groups > dotnet clr > august 2004 >

dotnet clr : Re: Determine if assembly is loaded from GAC


Shell
8/12/2004 9:49:35 PM
Ok... problems 1 and 2 solved. Now, is there anyway to specify that my
app should use *only* the dll in the GAC? That is, if it isn't there in
the GAC, I do not want it to try and discover it elsewhere (such as in
the executing folder, etc.)

Essentially, I want to ensure that the deployed app uses only my
original library. I've incorporated signature verification and token
checks into my code, but I'd like to restrict it to getting the dll
from the GAC alone.
Junfeng Zhang[MSFT]
8/15/2004 3:09:24 PM
In v1.0 and v1.1, you can try setting the application base to some
non-existing directory.

In v2.0, you can use AppDomainSetup.DisallowApplicationBase Probing.
http://blogs.msdn.com/junfeng/archive/2004/08/02/204364.aspx

--
Junfeng Zhang
http://blogs.msdn.com/junfeng

This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button