AppDomainSetup.DisallowPublisherPolicy 屬性

定義

取得或設定值,指出組態檔的 <publisherPolicy> 區段是否套用至應用程式定義域。Gets or sets a value that indicates whether the <publisherPolicy> section of the configuration file is applied to an application domain.

public:
 property bool DisallowPublisherPolicy { bool get(); void set(bool value); };
public bool DisallowPublisherPolicy { get; set; }
member this.DisallowPublisherPolicy : bool with get, set
Public Property DisallowPublisherPolicy As Boolean

屬性值

Boolean

如果忽略應用程式定義域之組態檔的 <publisherPolicy> 區段,則為 true;如果遵循所宣告的發行者原則,則為 falsetrue if the <publisherPolicy> section of the configuration file for an application domain is ignored; false if the declared publisher policy is honored.

備註

DisallowPublisherPolicy屬性特別適用于在本機載入的 Web 應用程式。The DisallowPublisherPolicy property specifically applies to a Web application that is loaded locally. 使用這個屬性有助於防止惡意嘗試以安全模式執行不安全的 Web 應用程式。Use this property to help prevent a malicious attempt to execute an unsafe Web application in safe mode.

如需有關略過發行者原則的詳細資訊,請參閱重新導向 元件版本 主題。For more information about bypassing publisher policy, see the Redirecting Assembly Versions topic. 如需安全模式的詳細資訊,請參閱 執行時間如何 找出元件主題的「檢查設定檔」一節。For more information about safe mode, see the "Examining the Configuration Files" section of the How the Runtime Locates Assemblies topic.

適用於