SecurityManager.SavePolicy 方法

定義

警告

此 API 現已淘汰。

警告

This method is 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 void SavePolicy();
[System.Obsolete]
public static void SavePolicy();
public static void SavePolicy();
[System.Obsolete("This method is 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 void SavePolicy();
[<System.Obsolete>]
static member SavePolicy : unit -> unit
static member SavePolicy : unit -> unit
[<System.Obsolete("This method is 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 SavePolicy : unit -> unit
Public Shared Sub SavePolicy ()
屬性

例外狀況

此方法使用程式碼存取安全(CAS)政策,但在 .NET Framework 4 中已過時。 若要啟用 CAS 政策以相容早期版本的 .NET 框架,請使用 <legacyCasPolicy> 元素

呼叫此方法的程式碼不具備 ControlPolicy

備註

此方法保存由 PolicyHierarchyPolicyLevel及其他代表安全政策配置的類別所暴露的策略。 除非呼叫此方法,否則對政策物件所做的變更不會被儲存,也不會影響後續的應用程式執行。

適用於