System.Security.Policy.IApplicationTrustManager.DetermineApplicationTrust Method

Determines whether an application should be executed and which set of permissions should be granted to it.

Syntax

public ApplicationTrust DetermineApplicationTrust (ActivationContext activationContext, TrustManagerContext context)

Parameters

activationContext
The activation context for the application.
context
The trust manager context for the application.

Returns

An object that contains security decisions about the application.

Remarks

The IApplicationTrustManager.DetermineApplicationTrust(ActivationContext, TrustManagerContext) method is called by the host to determine whether an application should be executed and which set of permissions it should be granted. IApplicationTrustManager.DetermineApplicationTrust(ActivationContext, TrustManagerContext) returns an System.Security.Policy.ApplicationTrust object with a ApplicationTrust.DefaultGrantSet property that contains a permission set representing the permissions to be granted to each assembly executing within the context of the application. The granted permissions do not apply to assemblies in the global assembly cache. The System.Security.Policy.ApplicationTrust object also has an ApplicationTrust.IsApplicationTrustedToRun property that the trust manager sets to indicate whether the application should be trusted. If the trust manager indicates that the application can be trusted, the host activates the application and grants its assemblies the set of permissions provided in the System.Security.Policy.ApplicationTrust collection.

Requirements

Namespace: System.Security.Policy
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0