ImpersonationLogonAs Method |
Makes the current thread impersonate the specified user account.
Namespace: MailBee.SecurityAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public bool LogonAs(
string accountName,
string domainName,
string password
)
Public Function LogonAs (
accountName As String,
domainName As String,
password As String
) As Boolean
Parameters
- accountName
- Type: SystemString
The name of the account being impersonated. - domainName
- Type: SystemString
The name of the domain the specified account belongs to. - password
- Type: SystemString
The password of the specified account.
Return Value
Type:
Booleantrue if succeeded; otherwise,
false.
Exceptions Remarks The impersonation lasts until the current thread exits or
Logoff method gets called.
See Also