編集

次の方法で共有


AppDomain.SetAppDomainPolicy(PolicyLevel) Method

Definition

Caution

AppDomain policy levels are obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

Establishes the security policy level for this application ___domain.

public:
 virtual void SetAppDomainPolicy(System::Security::Policy::PolicyLevel ^ domainPolicy);
public void SetAppDomainPolicy(System.Security.Policy.PolicyLevel domainPolicy);
[System.Obsolete("AppDomain policy levels are obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
[System.Security.SecurityCritical]
public void SetAppDomainPolicy(System.Security.Policy.PolicyLevel domainPolicy);
abstract member SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
override this.SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
[<System.Obsolete("AppDomain policy levels are obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
[<System.Security.SecurityCritical>]
abstract member SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
override this.SetAppDomainPolicy : System.Security.Policy.PolicyLevel -> unit
Public Sub SetAppDomainPolicy (domainPolicy As PolicyLevel)

Parameters

domainPolicy
PolicyLevel

The security policy level.

Implements

Attributes

Exceptions

domainPolicy is null.

The security policy level has already been set.

The operation is attempted on an unloaded application ___domain.

Remarks

Call this method before an assembly is loaded into the AppDomain in order for the security policy to have effect.

Applies to