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 http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlPolicy)]
public static void SavePolicyLevel(
	PolicyLevel level
)

Parameters

level
Type: System.Security.Policy.PolicyLevel

The policy level object to be saved.

Exception Condition
SecurityException

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

NotSupportedException

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.

SecurityPermission

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

.NET Framework
Available since 1.1
Return to top
Show: