What does the "ApplicaionDirectory" membership condition mean in .NET Code Access Security?

I'm not sure about the semantics of the ApplicationDirectory membership condition.

I am trying to use it in the .NET Framework 2.0 customizer. The explanation for this tool looks like this:

The app directory membership condition is true for all assemblies in the same directory or the child's running app directory. Meetings that meet this membership condition will be granted the permissions associated with this group code.

All other membership conditions such as strong name, hash allow me to enter some criteria, only in the App Catalog not. So how do you use it? Can anyone provide an explanation with an example? Many thanks.

Does generosity have to start to get an answer?

+2


a source to share


2 answers


When the .NET host launches the application, the host sets the ApplicationDirectory proof for all loaded assemblies to match the application's source folder. If the given assembly path is in the application directory, this assembly will match ApplicationDirectoryMembershipCondition.



There is actually very little practical reason to use ApplicationDirectoryMembershipCondition when configuring machine policy, although in theory it could be used for scenarios such as denying DLL permissions if the DLL is not loaded by the application "above" in its path. This particular membership condition is much more useful when you programmatically configure policy for an AppDomain.

+6


a source


My impression is that this is pretty static and the build inside that directory is affected by static policy.



+1


a source







All Articles