語言

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的。

屬性

備註

注意事項

.NET Framework 和 .NET 的所有版本中,代碼存取安全性(CAS)已被棄用。 最新版本的 .NET 不會接受 CAS 註釋,如果使用 CAS 相關 API,則會產生錯誤。 開發人員應尋求其他方法來完成安全任務。

此方法會建立一個包含「PolicyLevelAppDomain」的新Label版本。 新 PolicyLevel 版最初會包含與預設電腦政策相同的 NamedPermissionSet 物件,並擁有一個根代碼群組,授權 FullTrust 所有程式碼。

適用於

另請參閱