Breyta

Deila með


SecurityManager Class

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Provides the main access point for classes interacting with the security system. This class cannot be inherited.

public ref class SecurityManager abstract sealed
public ref class SecurityManager sealed
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static class SecurityManager
public sealed class SecurityManager
[System.Runtime.InteropServices.ComVisible(true)]
public static class SecurityManager
public static class SecurityManager
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SecurityManager = class
type SecurityManager = class
[<System.Runtime.InteropServices.ComVisible(true)>]
type SecurityManager = class
Public Class SecurityManager
Public NotInheritable Class SecurityManager
Inheritance
SecurityManager
Attributes

Remarks

Caution

Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.

Security provides methods to access and manipulate the security policy configuration. You cannot create instances of SecurityManager.

Properties

CheckExecutionRights
Obsolete.
Obsolete.

Gets or sets a value indicating whether code must have Execution in order to execute.

SecurityEnabled
Obsolete.
Obsolete.
Obsolete.

Gets or sets a value indicating whether security is enabled.

Methods

CurrentThreadRequiresSecurityContextCapture()

Determines whether the current thread requires a security context capture if its security state has to be re-created at a later point in time.

GetStandardSandbox(Evidence)

Gets a permission set that is safe to grant to an application that has the provided evidence.

GetZoneAndOrigin(ArrayList, ArrayList)

Gets the granted zone identity and URL identity permission sets for the current assembly.

IsGranted(IPermission)
Obsolete.
Obsolete.

Determines whether a permission is granted to the caller.

LoadPolicyLevelFromFile(String, PolicyLevelType)
Obsolete.
Obsolete.

Loads a PolicyLevel from the specified file.

LoadPolicyLevelFromString(String, PolicyLevelType)
Obsolete.
Obsolete.

Loads a PolicyLevel from the specified string.

PolicyHierarchy()
Obsolete.
Obsolete.

Provides an enumerator to access the security policy hierarchy by levels, such as computer policy and user policy.

ResolvePolicy(Evidence, PermissionSet, PermissionSet, PermissionSet, PermissionSet)
Obsolete.
Obsolete.

Determines what permissions to grant to code based on the specified evidence and requests.

ResolvePolicy(Evidence)
Obsolete.
Obsolete.

Determines what permissions to grant to code based on the specified evidence.

ResolvePolicy(Evidence[])
Obsolete.
Obsolete.

Determines what permissions to grant to code based on the specified evidence.

ResolvePolicyGroups(Evidence)
Obsolete.
Obsolete.

Gets a collection of code groups matching the specified evidence.

ResolveSystemPolicy(Evidence)
Obsolete.
Obsolete.

Determines which permissions to grant to code based on the specified evidence, excluding the policy for the AppDomain level.

SavePolicy()
Obsolete.
Obsolete.

Saves the modified security policy state.

SavePolicyLevel(PolicyLevel)
Obsolete.
Obsolete.

Saves a modified security policy level loaded with LoadPolicyLevelFromFile(String, PolicyLevelType).

Applies to