SecurityManager.SavePolicyLevel(PolicyLevel) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Attention
Cette API est à présent déconseillée.
Attention
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.
Enregistre un niveau de stratégie de sécurité modifié chargé avec LoadPolicyLevelFromFile(String, PolicyLevelType).
public:
static void SavePolicyLevel(System::Security::Policy::PolicyLevel ^ level);
[System.Obsolete]
public static void SavePolicyLevel(System.Security.Policy.PolicyLevel level);
public static void SavePolicyLevel(System.Security.Policy.PolicyLevel level);
[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);
[<System.Obsolete>]
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
static member SavePolicyLevel : System.Security.Policy.PolicyLevel -> 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 SavePolicyLevel : System.Security.Policy.PolicyLevel -> unit
Public Shared Sub SavePolicyLevel (level As PolicyLevel)
Paramètres
- level
- PolicyLevel
Objet de niveau stratégie à enregistrer.
- Attributs
Exceptions
Le code qui appelle cette méthode n’a ControlPolicypas .
Cette méthode utilise la stratégie de sécurité d’accès au code (CAS), qui est obsolète dans le .NET Framework 4. Pour activer la stratégie CAS pour la compatibilité avec les versions antérieures de .NET Framework, utilisez l’élément <legacyCasPolicy> élément.
Remarques
Le PolicyLevel fichier est enregistré dans le même emplacement à partir duquel il a été chargé.