/// <summary> /// Reverts impersonation of a security context /// </summary> public void RevertContext() { // check object state if (_disposed) { throw new ObjectDisposedException(GetType().FullName); } // revert impersonation int error = SSPINative.RevertSecurityContext(ref _contextHandle); if (error < 0) { throw new SSPIException(error, "Could not revert security context impersonation"); } }