title: Windows Impersonation from C#
body: <p>How can a C# program running as LocalSystem impersonate the login identity of another user temporarily? Roughly speaking I have a Windows Service that I'd like to run as LocalSystem but at times impersonate user XYZ (when connecting to a db using windows integrated security). </p>
  
  <p>Most important of all: Is there a way to do this without knowing the other user's password? </p>
  
  <p>Note: if a password is mandatory is there a recommended strategy for storing a password securely (c# and/or vbscript).</p>