public void EndImpersonate() { try { if (Settings.Enabled) { Impersonate.UndoImpersonation(); } } catch (Exception ex) { //throw ex; } }
public void BeginImpersonate() { try { if (Settings.Enabled) { Boolean activated = Impersonate.ImpersonateValidUser(Settings.Username, Settings.Domain, Settings.Password); if (activated) { } else { } } else { } } catch (Exception ex) { //throw ex; } }
public ImpersonateHelper(Config config) { this.Config = config; Impersonate = new Impersonate(); }