SecurityManager.SavePolicy Method

Definition

Caution

This API is now deprecated.

Caution

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 ()
Attributes

Exceptions

This method uses code access security (CAS) policy, which is obsolete in the .NET Framework 4. To enable CAS policy for compatibility with earlier versions of the .NET Framework, use the <legacyCasPolicy> element.

The code that calls this method does not have ControlPolicy.

Remarks

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.

Applies to