SecurityManager.SavePolicyLevel Method (PolicyLevel)

Note: This API is now obsolete.

Saves a modified security policy level loaded with LoadPolicyLevelFromFile.

Namespace:   System.Security
Assembly:  mscorlib (in mscorlib.dll)

[ObsoleteAttribute("This method is obsolete and will be removed in a future release of the .NET Framework. See for more information.")]
[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPolicy)]
public static void SavePolicyLevel(
	PolicyLevel level


Type: System.Security.Policy.PolicyLevel

The policy level object to be saved.

Exception Condition

The code that calls this method does not have SecurityPermissionFlag.ControlPolicy.


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 PolicyLevel will be saved to the same location from which it loaded.


for the ability to modify policy. Associated enumeration: SecurityPermissionFlag.ControlPolicy

.NET Framework
Available since 1.1
Return to top