This documentation is archived and is not being maintained.

System.Security Namespace

The System.Security namespace provides the underlying structure of the common language runtime security system, including base classes for permissions.

Public classAllowPartiallyTrustedCallersAttributeAllows strong-named assemblies to be called by partially trusted code. Without this declaration, only fully trusted callers are able to use such assemblies. This class cannot be inherited.
Public classCodeAccessPermissionDefines the underlying structure of all code access permissions.
Public classHostProtectionExceptionThe exception that is thrown when a denied host resource is detected.
Public classHostSecurityManagerAllows the control and customization of security behavior for application domains.
Public classNamedPermissionSetDefines a permission set that has a name and description associated with it. This class cannot be inherited.
Public classPermissionSetRepresents a collection that can contain many different types of permissions.
Public classSecureStringRepresents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed. This class cannot be inherited.
Public classSecurityContextEncapsulates and propagates all security-related data for execution contexts transferred across threads. This class cannot be inherited.
Public classSecurityCriticalAttributeSpecifies that code or an assembly performs security-critical operations.
Public classSecurityElementRepresents the XML object model for encoding security objects. This class cannot be inherited.
Public classSecurityExceptionThe exception that is thrown when a security error is detected.
Public classSecurityManagerProvides the main access point for classes interacting with the security system. This class cannot be inherited.
Public classSecuritySafeCriticalAttributeIdentifies types or members as security-critical and safely accessible by transparent code.
Public classSecurityStateProvides a base class for requesting the security status of an action from the AppDomainManager object.
Public classSecurityTransparentAttributeSpecifies that an assembly cannot cause an elevation of privilege.
Public classSecurityTreatAsSafeAttributeIdentifies which of the nonpublic SecurityCriticalAttribute members are accessible by transparent code within the assembly.
Public classSuppressUnmanagedCodeSecurityAttributeAllows managed code to call into unmanaged code without a stack walk. This class cannot be inherited.
Public classUnverifiableCodeAttributeMarks modules containing unverifiable code. This class cannot be inherited.
Public classVerificationExceptionThe exception that is thrown when the security policy requires code to be type safe and the verification process is unable to verify that the code is type safe.
Public classXmlSyntaxExceptionThe exception that is thrown when there is a syntax error in XML parsing. This class cannot be inherited.

Public interfaceIEvidenceFactoryGets an object's Evidence.
Public interfaceIPermissionDefines methods implemented by permission types.
Public interfaceISecurityEncodableDefines the methods that convert permission object state to and from XML element representation.
Public interfaceISecurityPolicyEncodableSupports the methods that convert permission object state to and from an XML element representation.
Public interfaceIStackWalkManages the stack walk that determines whether all callers in the call stack have the required permissions to access a protected resource.

Public enumerationHostSecurityManagerOptionsSpecifies the security policy components to be used by the host security manager.
Public enumerationManifestKindsRepresents the type of manifest that the signature information applies to.
Public enumerationPolicyLevelTypeSpecifies the type of a managed code policy level.
Public enumerationSecurityCriticalScopeSpecifies the scope of a SecurityCriticalAttribute.
Public enumerationSecurityZoneDefines the integer values corresponding to security zones used by security policy.