WindowsIdentity Constructor (SerializationInfo^, StreamingContext)

 

Initializes a new instance of the WindowsIdentity class for the user represented by information in a SerializationInfo stream.

Namespace:   System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)

public:
WindowsIdentity(
	SerializationInfo^ info,
	StreamingContext context
)

Parameters

info
Type: System.Runtime.Serialization::SerializationInfo^

The object containing the account information for the user.

context
Type: System.Runtime.Serialization::StreamingContext

An object that indicates the stream characteristics.

Exception Condition
NotSupportedException

A WindowsIdentity cannot be serialized across processes.

SecurityException

The caller does not have the correct permissions.

-or-

A Win32 error occurred.

System_CAPS_security Security Note

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

SecurityPermission

for ability to manipulate the principal object. Associated enumeration: SecurityPermissionFlag::ControlPrincipal.

.NET Framework
Available since 1.1
Return to top
Show: