SecurityManager.LoadPolicyLevelFromFile(String, PolicyLevelType) Metoda

Definice

Upozornění

Toto rozhraní API je teď zastaralé.

Upozornění

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.

PolicyLevel Načte ze zadaného souboru.

public:
 static System::Security::Policy::PolicyLevel ^ LoadPolicyLevelFromFile(System::String ^ path, System::Security::PolicyLevelType type);
[System.Obsolete]
public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromFile (string path, System.Security.PolicyLevelType type);
public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromFile (string path, System.Security.PolicyLevelType type);
[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 System.Security.Policy.PolicyLevel LoadPolicyLevelFromFile (string path, System.Security.PolicyLevelType type);
[<System.Obsolete>]
static member LoadPolicyLevelFromFile : string * System.Security.PolicyLevelType -> System.Security.Policy.PolicyLevel
static member LoadPolicyLevelFromFile : string * System.Security.PolicyLevelType -> System.Security.Policy.PolicyLevel
[<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 LoadPolicyLevelFromFile : string * System.Security.PolicyLevelType -> System.Security.Policy.PolicyLevel
Public Shared Function LoadPolicyLevelFromFile (path As String, type As PolicyLevelType) As PolicyLevel

Parametry

path
String

Fyzická cesta k souboru obsahujícímu informace o zásadách zabezpečení.

type
PolicyLevelType

Jedna z hodnot výčtu, která určuje typ úrovně zásad, která se má načíst.

Návraty

PolicyLevel

Úroveň načtené zásady.

Atributy

Výjimky

Parametr path je null.

Soubor označený parametrem path neexistuje.

Kód, který volá tuto metodu nemá ControlPolicy.

-nebo- Kód, který volá tuto metodu nemá Read.

-nebo- Kód, který volá tuto metodu nemá Write.

-nebo- Kód, který volá tuto metodu nemá PathDiscovery.

Tato metoda používá zásady zabezpečení přístupu kódu (CAS), které jsou zastaralé v .NET Framework 4. Pokud chcete povolit zásady CAS pro kompatibilitu se staršími verzemi .NET Framework, použijte <element legacyCasPolicy>.

Platí pro