HostSecurityManager.DomainPolicy 屬性

定義

警告

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:
 virtual property System::Security::Policy::PolicyLevel ^ DomainPolicy { System::Security::Policy::PolicyLevel ^ get(); };
public virtual System.Security.Policy.PolicyLevel DomainPolicy { get; }
[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 virtual System.Security.Policy.PolicyLevel DomainPolicy { get; }
member this.DomainPolicy : 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.")>]
member this.DomainPolicy : System.Security.Policy.PolicyLevel
Public Overridable ReadOnly Property DomainPolicy As PolicyLevel

屬性值

目前應用程式定義域的安全性原則。 預設為 null

屬性

例外狀況

此方法使用程式碼存取安全性 (CAS) 原則,在 .NET Framework 4 中已過時。 若要啟用 CAS 原則對舊版 .NET Framework 的相容性,請使用 <legacyCasPolicy> 項目

備註

這個屬性可以在衍生類別中覆寫。 這個基底實作一定會傳回 null

這個屬性會在建立時 AppDomain 呼叫。 它可讓主機提供目前 AppDomain 的原則。 原則層級包含下列各項:

  • 一組組織成單一根樹狀結構的程式碼群組。

  • 由程式碼群組參考的一組具名許可權集合,指定要授與屬於程式碼群組之程式碼的許可權。

  • 完全信任的元件清單。

重要

如需重要實作資訊,請參閱 類別的 HostSecurityManager 繼承者附注。

適用於