语言

PolicyLevel.CreateAppDomainLevel 方法

定义

注意

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

注意

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 https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
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 https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
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的 。

特性

注解

Caution

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

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

适用于

另请参阅