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.

保存修改的安全策略状态。Saves the modified security policy state.

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 中已过时。This method uses code access security (CAS) policy, which is obsolete in the .NET Framework 4. 若要使 CAS 策略与早期版本的 .NET Framework 兼容,请使用 <legacyCasPolicy> 元素To enable CAS policy for compatibility with earlier versions of the .NET Framework, use the <legacyCasPolicy> element.

调用此方法的代码不含 ControlPolicyThe code that calls this method does not have ControlPolicy.

注解

此方法将策略保存为由 PolicyHierarchyPolicyLevel 和表示安全策略配置的其他类公开。This method saves the policy as exposed by PolicyHierarchy, PolicyLevel, and other classes that represent configuration of the security policy. 除非调用此方法,否则不会保存对策略对象所做的更改,并且不会影响后续的应用程序运行。Unless this method is called, changes made to the policy objects will not be saved and will not affect subsequent application runs.

适用于