DetermineApplicationTrust Method
Collapse the table of content
Expand the table of content

ApplicationSecurityManager.DetermineApplicationTrust Method

Determines whether the user approves the specified application to execute with the requested permission set.

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

[SecurityPermissionAttribute(SecurityAction.Assert, Unrestricted = true)]
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.NoFlags|SecurityPermissionFlag.ControlEvidence|SecurityPermissionFlag.ControlPolicy)]
public static bool DetermineApplicationTrust(
	ActivationContext activationContext,
	TrustManagerContext context


Type: System.ActivationContext

An ActivationContext identifying the activation context for the application.

Type: System.Security.Policy.TrustManagerContext

A TrustManagerContext identifying the trust manager context for the application.

Return Value

Type: System.Boolean
true to execute the specified application; otherwise, false.


The activationContext parameter is null.

DetermineApplicationTrust uses the configured ApplicationTrustManager property to determine whether to allow execution of the specified application with the permission set requested in the application manifest. The trust manager's behavior is dependent on the trust manager implementation and the information passed in the context parameter. The default behavior of the trust manager is to establish a user interface (UI) dialog box to determine the user's approval. However, a trust manager can also determine an application's trust status based on other criteria, such as decisions provided by a corporate database. The trust decision can be persisted, depending upon the context parameters properties and the trust manager implementation. If the trust for the application is persisted for a decision based on a user dialog box, future calls to the ApplicationSecurityManager will not present the UI dialog box for every request for that application. DetermineApplicationTrust is called after the manifest, but before the application has been downloaded to the local system.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

© 2015 Microsoft