Share via


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 Framework 兼容,请使用 <legacyCasPolicy> 元素

调用此方法的代码不含 ControlPolicy

注解

此方法将策略保存为由 PolicyHierarchyPolicyLevel和表示安全策略配置的其他类公开。 除非调用此方法,否则不会保存对策略对象所做的更改,并且不会影响后续应用程序运行。

适用于