HostSecurityManager::DetermineApplicationTrust Method (Evidence^, Evidence^, TrustManagerContext^)


Determines whether an application should be executed.

Namespace:   System.Security
Assembly:  mscorlib (in mscorlib.dll)

[SecurityPermissionAttribute(SecurityAction::Assert, Unrestricted = true)]
virtual ApplicationTrust^ DetermineApplicationTrust(
	Evidence^ applicationEvidence,
	Evidence^ activatorEvidence,
	TrustManagerContext^ context


Type: System.Security.Policy::Evidence^

The evidence for the application to be activated.

Type: System.Security.Policy::Evidence^

Optionally, the evidence for the activating application domain.

Type: System.Security.Policy::TrustManagerContext^

The trust context.

Return Value

Type: System.Security.Policy::ApplicationTrust^

An object that contains trust information about the application.

Exception Condition

applicationEvidence is null.


An ActivationArguments object could not be found in the application evidence.


The ActivationContext property in the activation arguments is null.


The ApplicationTrust grant set does not contain the minimum request set specified by the ActivationContext.

This method can be overridden by a derived class. The base implementation calls the application security manager to determine if the application should be executed.

The base implementation does not use the activator evidence. However, an overridden implementation could use the activator evidence to determine the security evidence for the application domain attempting to activate the application.

The following example shows how to override the DetermineApplicationTrust method for a custom host security manager. This example is part of a larger example provided for the HostSecurityManager class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top