ESRI.ArcGIS.ADF.Core
Impersonate(String,String,String,LogonSessionType) Method
See Also  Send comments on this topic.
ESRI.ArcGIS.ADF Namespace > Impersonation Class > Impersonate Method : Impersonate(String,String,String,LogonSessionType) Method




userName
String value that specifies the name of the user. This is the name of the user account to log on to. If you use the UPN format, user@DNS_domain_name, the Domain parameter must be NULL.
password
String that specifies the clear-text password for the user account specified by Username
domain
String value that specifies the name of the domain or server whose account The type of logon to perform. database contains the UserName account. If this parameter is NULL, the user name must be specified in UPN format. If this parameter is ".", the function validates the account using only the local account database.
logonSessionType
Used to dynamically modify the current windows user with the specified user

Syntax

Visual Basic (Declaration) 
Public Overloads Function Impersonate( _
   ByVal userName As String, _
   ByVal password As String, _
   ByVal domain As String, _
   ByVal logonSessionType As Impersonation.LogonSessionType _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As Impersonation
Dim userName As String
Dim password As String
Dim domain As String
Dim logonSessionType As Impersonation.LogonSessionType
Dim value As Boolean
 
value = instance.Impersonate(userName, password, domain, logonSessionType)
C# 
public bool Impersonate( 
   string userName,
   string password,
   string domain,
   Impersonation.LogonSessionType logonSessionType
)

Parameters

userName
String value that specifies the name of the user. This is the name of the user account to log on to. If you use the UPN format, user@DNS_domain_name, the Domain parameter must be NULL.
password
String that specifies the clear-text password for the user account specified by Username
domain
String value that specifies the name of the domain or server whose account The type of logon to perform. database contains the UserName account. If this parameter is NULL, the user name must be specified in UPN format. If this parameter is ".", the function validates the account using only the local account database.
logonSessionType

Return Value

True if success, false if failed

See Also

© 2010 All Rights Reserved.