SecurityManager 类

定义

注意

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

对与安全系统交互的类提供主访问点。 此类不能被继承。

public ref class SecurityManager abstract sealed
public ref class SecurityManager sealed
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}")]
public static class SecurityManager
public sealed class SecurityManager
[System.Runtime.InteropServices.ComVisible(true)]
public static class SecurityManager
type SecurityManager = class
[<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
[<System.Runtime.InteropServices.ComVisible(true)>]
type SecurityManager = class
Public Class SecurityManager
Public NotInheritable Class SecurityManager
继承
SecurityManager
属性

注解

安全性提供访问和操作安全策略配置的方法。 无法创建 . 的 SecurityManager实例。

属性

CheckExecutionRights
已过时。
已过时。

获取或设置一个值,该值指示代码是否必须具有 Execution 才能执行。

SecurityEnabled
已过时。
已过时。
已过时。
已过时。

获取或设置指示是否启用安全的值。

方法

CurrentThreadRequiresSecurityContextCapture()

确定在必须在稍后的某个时间点重新创建当前线程的安全状态的情况下,当前线程是否需要安全上下文捕获。

GetStandardSandbox(Evidence)

获取一个权限集,对具有提供的证据的应用程序授予此权限集是安全的。

GetZoneAndOrigin(ArrayList, ArrayList)

获取当前程序集的已授予的区域标识和 URL 标识权限集。

IsGranted(IPermission)
已过时。
已过时。

确定是否将权限授予调用方。

LoadPolicyLevelFromFile(String, PolicyLevelType)
已过时。
已过时。

从指定的文件加载 PolicyLevel

LoadPolicyLevelFromString(String, PolicyLevelType)
已过时。
已过时。

从指定的字符串加载 PolicyLevel

PolicyHierarchy()
已过时。
已过时。

提供一个枚举器,以按等级访问安全策略层次结构,例如计算机策略和用户策略。

ResolvePolicy(Evidence)
已过时。
已过时。

根据指定的证据确定向代码授予什么权限。

ResolvePolicy(Evidence, PermissionSet, PermissionSet, PermissionSet, PermissionSet)
已过时。
已过时。

根据指定的证据和请求确定向代码授予什么权限。

ResolvePolicy(Evidence[])
已过时。
已过时。

根据指定的证据确定向代码授予什么权限。

ResolvePolicyGroups(Evidence)
已过时。
已过时。

获取与指定证据相匹配的代码组集合。

ResolveSystemPolicy(Evidence)
已过时。
已过时。

根据指定的证据确定授予代码的权限,不包括 AppDomain 级别的策略。

SavePolicy()
已过时。
已过时。

保存修改的安全策略状态。

SavePolicyLevel(PolicyLevel)
已过时。
已过时。

保存用 LoadPolicyLevelFromFile(String, PolicyLevelType) 加载的已修改的安全策略级别。

适用于