ESRI.ArcGIS.ADF.Core
Impersonate(String,String,String) Method
See Also  Send Feedback
ESRI.ArcGIS.ADF Namespace > Impersonation Class > Impersonate Method : Impersonate(String,String,String) 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 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.
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 _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As Impersonation
Dim userName As String
Dim password As String
Dim domain As String
Dim value As Boolean
 
value = instance.Impersonate(userName, password, domain)
C# 
public bool Impersonate( 
   string userName,
   string password,
   string domain
)

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 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.

Return Value

True if success, false if failed

Requirements

Target 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

See Also

© 2011 All Rights Reserved.