PolicyLevel.CreateAppDomainLevel 方法

定义

注意

AppDomain policy levels are obsolete. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

注意

AppDomain policy levels are obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.

注意

Code Access Security is not supported or honored by the runtime.

注意

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.

创建供在应用程序域策略级别使用的新的策略级别。

public:
 static System::Security::Policy::PolicyLevel ^ CreateAppDomainLevel();
[System.Obsolete("AppDomain policy levels are obsolete. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.Policy.PolicyLevel CreateAppDomainLevel ();
[System.Obsolete("AppDomain policy levels are obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.Policy.PolicyLevel CreateAppDomainLevel ();
[System.Obsolete("Code Access Security is not supported or honored by the runtime.")]
public static System.Security.Policy.PolicyLevel CreateAppDomainLevel ();
public static System.Security.Policy.PolicyLevel CreateAppDomainLevel ();
[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.")]
public static System.Security.Policy.PolicyLevel CreateAppDomainLevel ();
[<System.Obsolete("AppDomain policy levels are obsolete. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member CreateAppDomainLevel : unit -> System.Security.Policy.PolicyLevel
[<System.Obsolete("AppDomain policy levels are obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member CreateAppDomainLevel : unit -> System.Security.Policy.PolicyLevel
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.")>]
static member CreateAppDomainLevel : unit -> System.Security.Policy.PolicyLevel
static member CreateAppDomainLevel : unit -> System.Security.Policy.PolicyLevel
[<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.")>]
static member CreateAppDomainLevel : unit -> System.Security.Policy.PolicyLevel
Public Shared Function CreateAppDomainLevel () As PolicyLevel

返回

PolicyLevel

新创建的 PolicyLevel

属性

注解

注意

代码访问安全性 (CAS) 已在所有版本的 .NET Framework 和 .NET 中弃用。 使用与 CAS 相关的 API 时,最新版本的 .NET 不遵循 CAS 注释并生成错误。 开发人员应寻求实现安全任务的替代方法。

此方法使用“AppDomain”创建新的 PolicyLevel Label 方法。 新 PolicyLevel 代码最初将包含与默认计算机策略中相同的 NamedPermissionSet 对象,并且将具有一个授予 FullTrust 所有代码的根代码组。

适用于

另请参阅