How To: Use Impersonation and Delegation in ASP.NET 2.0

http://msdn2.microsoft.com/en-us/library/ms998351.aspx