ESRI.ArcGIS.ADF.Core | |
Impersonate(String,String,String,LogonSessionType) Method | |
See Also Send Feedback |
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
- The type of logon to perform.
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
- The type of logon to perform.
Return Value
True if success, false if failedTarget Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family