CÁC GIẢI PHÁP LẬP TRÌNH C# - Trang 547

547

Chương 13: Bảo mật

// Trở về người dùng Windows cũ bằng đối tượng

// WindowsImpersonationContext.

impContext.Undo();as

// Hiển thị định danh đang tích cực (sau khi giả nhận).

Console.WriteLine("Identity after impersonation = {0}",

WindowsIdentity.GetCurrent().Name);

}

}

}