SecurityManager.SavePolicyLevel(PolicyLevel) 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 a modified security policy level loaded with LoadPolicyLevelFromFile(String, PolicyLevelType).

C#
[System.Obsolete]
public static void SavePolicyLevel(System.Security.Policy.PolicyLevel level);
C#
public static void SavePolicyLevel(System.Security.Policy.PolicyLevel level);
C#
[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 SavePolicyLevel(System.Security.Policy.PolicyLevel level);

Parameters

level
PolicyLevel

The policy level object to be saved.

Attributes

Exceptions

The code that calls this method does not have 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.

Remarks

The PolicyLevel will be saved to the same location from which it loaded.

Applies to

Proizvod Verzije (Zastarjelo)
.NET (8 (package-provided), 9 (package-provided), 10 (package-provided))
.NET Framework 1.1, 2.0, 3.0, 3.5 (4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
.NET Standard 2.0 (package-provided)
Windows Desktop (3.0, 3.1, 5, 6, 7, 8, 9, 10)