SecurityManager::SavePolicyLevel Method (PolicyLevel^)
.NET Framework (current version)
Note: This API is now obsolete.Namespace:
System.Security
Assembly: mscorlib (in mscorlib.dll)
Return to top
Saves a modified security policy level loaded with LoadPolicyLevelFromFile.
Assembly: mscorlib (in mscorlib.dll)
public: [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)] 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
Available since 1.1
Show: