title: Calling WindowsIdentity.Impersonate does nothing
body: <p>I'm using the following <a href="http://msdn.microsoft.com/en-us/library/system.security.principal.windowsimpersonationcontext.aspx" rel="nofollow">Microsoft example</a>.  Every time the WindowsIdentity instance calls .Impersonate(), nothing happens.  No error, no impersonation.<br>
    Both before and after the call, the current identity is always the AppPool identity.<br>
  I've also tried another example found online, <a href="http://blog.shynet.nl/post/2008/08/08/Impersonator.aspx" rel="nofollow">the Impersonator class</a>, and the same thing happens.  </p>
  
  <p>The only modification I've made to those examples is changing LOGON32_LOGON_INTERACTIVE to LOGON32_LOGON_NETWORK in the LogOnUser call,  since using Interactive always returned a 0 error.</p>
  
  <p>It's an ASP.NET 4.0 app running on a Win2k8 server trying to impersonate a user in AD.</p>
  
  <p><strong>EDIT:</strong>
  I hadn't mentioned this originally, but I modified the Microsoft example and turned it into a class so that I can could it from my ASP.NET app.  I also have <code>impersonate=true</code> in web.config.  </p>