mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.IDisposable System.Runtime.Serialization.IDeserializationCallback System.Runtime.Serialization.ISerializable System.Security.Principal.IIdentity System.Runtime.InteropServices.ComVisible(true)

Call the method to create a object that represents the current user.

Represents a Windows user.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The following table shows initial property values for an instance of .

  Property

  Initial value

  Negotiate

  Normal

  false

  You can retrieve the token represented by by calling unmanaged code such as the Win32 API LogonUser function. Always release by calling the Win32 API CloseHandle function. For more information on calling unmanaged code, see Consuming Unmanaged DLL Functions.

  Initializes a new instance of the class for the user represented by the specified Windows account token.

  The account token for the user on whose behalf the code is running.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  A UPN has the format username@domainname.com, in other words, an email address. The UPN identified in is used to retrieve a token for that user through the Win32 API LsaLogonUser function. In turn that token is used to identify the user. An exception might be returned due to the inability to log on using the supplied UPN.

  This constructor is intended for use on computers joined only to Windows Server 2003 domains. An exception is thrown for other domain types. This restriction is because the constructor uses the KERB_S4U_LOGON structure.

  Initializes a new instance of the class for the user represented by the specified User Principal Name (UPN).

  The UPN for the user on whose behalf the code is running.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The following table shows initial property values for an instance of .

  Property

  Initial value

  Normal

  false

  The value of the parameter is used to set the parameter. If is null, the security system sets to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.

  You can retrieve the token represented by by calling unmanaged code such as the Win32 API LogonUser function. Always release by calling the Win32 API CloseHandle function. For more information on calling unmanaged code, see Consuming Unmanaged DLL Functions.

  Initializes a new instance of the class for the user represented by the specified Windows account token and the specified authentication type.

  The account token for the user on whose behalf the code is running.
  (Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  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.

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

  The object containing the account information for the user.
  An object that indicates the stream characteristics.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The value of the parameter is used to set the parameter. If is null, the security system sets to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.

  The UPN identified in is used to retrieve a token for that user through the Win32 API LsaLogonUser function. In turn that token is used to identify the user. An exception might be returned due to the inability to log on using the supplied UPN.

  This constructor is intended for use only on computers joined to Windows Server 2003 domains. An exception is thrown for other domain types. This restriction is because the constructor uses the KERB_S4U_LOGON structure.

  Initializes a new instance of the class for the user represented by the specified User Principal Name (UPN) and the specified authentication type.

  The UPN for the user on whose behalf the code is running.
  (Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The following table shows initial property values for an instance of .

  Property

  Initial Value

  false

  The value of the parameter is used to set the parameter. If is null, the security system sets to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.

  You can retrieve the token represented by by calling unmanaged code such as the Win32 API LogonUser function. Always release by calling the Win32 API CloseHandle function. For more information on calling unmanaged code, see Consuming Unmanaged DLL Functions.

  Initializes a new instance of the class for the user represented by the specified Windows account token, the specified authentication type, and the specified Windows account type.

  The account token for the user on whose behalf the code is running.
  (Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.
  One of the enumeration values.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The value of the parameter is used to set the parameter. If is null, the security system sets to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.

  You can retrieve the token represented by by calling unmanaged code such as the Win32 API LogonUser function. Always release by calling the Win32 API CloseHandle function. For more information on calling unmanaged code, see Consuming Unmanaged DLL Functions.

  Initializes a new instance of the class for the user represented by the specified Windows account token, the specified authentication type, the specified Windows account type, and the specified authentication status.

  The account token for the user on whose behalf the code is running.
  (Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.
  One of the enumeration values.
  true to indicate that the user is authenticated; otherwise, false.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String The authentication method (e.g. NTLM, POSIX ...).

  This property is informational; it is not used by the security system. On Windows Vista and later versions of the Windows operating system, the default value for this property is Negotiate, which chooses the best security support provider (SSP) based on customer-configured security policy. The default property value for earlier versions of the Windows operating system is Kerberos.

  Gets the type of authentication used to identify the user.

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Void

  Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method.

  Releases all resources used by the .

- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Void ``

  This method is called by the public Dispose() method and the method. Dispose() invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose() method of each referenced object.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Method
  System.Void To be added. To be added. 1.0.5000.0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Principal.WindowsIdentity

  This property returns an empty object that enables you to treat operations as anonymous. The property value does not correspond to a Windows anonymous user and cannot be used for impersonation. Also, note that the identity returned by this property is not static; each call to returns a different anonymous identity.

  You can use the property to detect the return value from . However, detects both the Windows anonymous identity and the anonymous identity returned by this method. To use the latter identity, cache the return value instead of relying on the property.

  Returns a object that you can use as a sentinel value in your code to represent an anonymous user. The property value does not represent the built-in anonymous identity used by the Windows operating system.

  An object that represents an anonymous user.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Principal.WindowsIdentity `WindowsIdentity wi = WindowsIdentity.GetCurrent (); Console.WriteLine ("\tUserName:\t{0}", wi.Name); Console.WriteLine ("\tToken:\t\t{0}", wi.Token);`

  Returns a object that represents the current Windows user.

  An object that represents the current user.

- Method
  2.0.0.0
  4.0.0.0
  System.Security.Principal.WindowsIdentity ``

  If is true and the thread is not impersonating, the returned object has no value. If is false and the thread is impersonating, the for the thread is returned. If is false and the thread is not impersonating, the for the process is returned.

  Returns a object that represents the Windows identity for either the thread or the process, depending on the value of the parameter.

  An object that represents a Windows user.

  true to return the only if the thread is currently impersonating; false to return the of the thread if it is impersonating or the of the process if the thread is not currently impersonating.
- Method
  2.0.0.0
  4.0.0.0
  System.Security.Principal.WindowsIdentity ``

  The parameter specifies an access mask that identifies the requested types of access to the access token. These requested access types are compared with the token's discretionary access control list (DACL) to determine which types of access are granted or denied.

  Returns a object that represents the current Windows user, using the specified desired token access level.

  An object that represents the current user.

  A bitwise combination of the enumeration values.
- Property
  2.0.0.0
  4.0.0.0
  System.Security.Principal.IdentityReferenceCollection To be added. To be added.

  Gets the groups the current Windows user belongs to.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Principal.WindowsImpersonationContext

  On Windows NT platforms, the current user must have sufficient rights to allow impersonation.

  Impersonates the user represented by the object.

  An object that represents the Windows user prior to impersonation; this can be used to revert to the original user's context.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Principal.WindowsImpersonationContext ``

  On Windows NT platforms, the current user must have sufficient rights to allow impersonation.

  Calling the method with a value of is equivalent to calling the Win32 RevertToSelf function. If another user is currently being impersonated, control reverts to the original user.

  For more information about calls to unmanaged code, see Consuming Unmanaged DLL Functions.

  Impersonates the user represented by the specified user token.

  An object that represents the Windows user prior to impersonation; this object can be used to revert to the original user's context.

  The handle of a Windows account token. This token is usually retrieved through a call to unmanaged code, such as a call to the Win32 API LogonUser function.
- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Security.Principal.TokenImpersonationLevel To be added.

  Describes the impersonation level to be used to connect to WMI.

  Gets the impersonation level for the user.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean True if the current identity is anonymous, false otherwise.

  The property detects both the Windows anonymous identity and the anonymous identity that is returned by the method.

  Anonymous accounts are typically encountered only from within ASP.NET-based applications when anonymous access is allowed by Internet Information Services (IIS).

  Gets a value that indicates whether the user account is identified as an anonymous account by the system.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean True if the current identity was authenticated, false otherwise. To be added

  Gets a value indicating whether the user has been authenticated by Windows.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean True if the current identity is guest, false otherwise. To be added

  Gets a value indicating whether the user account is identified as a account by the system.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean True if the current identity is SYSTEM, false otherwise. To be added

  Gets a value indicating whether the user account is identified as a account by the system.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String Textual representation of the current identity (e.g. user name).

  The logon name is in the form DOMAIN\USERNAME.

  Gets the user's Windows logon name.

- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Security.Principal.SecurityIdentifier To be added.

  The SID uniquely identifies a user or group on all Windows NT implementations. The returned SID identifies the default owner SID that will be applied to newly created objects.

  Gets the security identifier (SID) for the token owner.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added.

  Implements the interface and is called back by the deserialization event when deserialization is complete.

  The source of the deserialization event.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  This method sets a with the logical call context information. During deserialization, the execution context object is reconstituted from the transmitted over the stream.

  For more information, see .

  Sets the object with the logical context information needed to recreate an instance of this execution context.

  An object containing the information required to serialize the . An object containing the source and destination of the serialized stream associated with the .
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IntPtr To be added: an object of type 'IntPtr'

  Do not explicitly release the account token that is returned by the property. The token is released by the method, which you can call in code. is also automatically called by the garbage collector.

  The account token that is returned by the property is a duplicate of the Windows token that is used to create the object and is automatically released by the .NET Framework. This is different from the account token (the parameter for the constructor), which is used to create the object. is a Windows account token that is created by a call to LogonUser and must be closed to avoid a memory leak.

  Gets the Windows account token for the user.

- Property
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Security.Principal.SecurityIdentifier To be added.

  The SID uniquely identifies a user or group on all Windows NT implementations.

  The object returned by the method is not the same as the Windows anonymous user. This property gets null for an anonymous user represented by the object returned by the method; it does not get the SID representing an anonymous Windows user.

  Gets the security identifier (SID) for the user.