共用方式為


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 與所有程式碼的單一根程式碼群組。

適用於

另請參閱