Impersonation Constructor
Creates an instance of Impersonation class.

Namespace: MailBee.Security
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public Impersonation()
Exceptions
ExceptionCondition
MailBeeLicenseExceptionMailBee.NET Security Powerup not licensed.
Remarks

This overload requires the license key be already set (such as with MailBee.Global.LicenseKey property, app.config, web.config, or in Windows registry).

If your application is multi-threaded and you need to have multiple impersonated threads, each such thread must maintain its own instance of Impersonation class. Single-threaded applications need only a single instance of this class.

To get the name of the user account being used by the current thread, call System.Security.Principal.WindowsIdentity.GetCurrent().Name.

See Also