WindowsIdentity.Impersonate() fails

From: Dominick Baier (dotnet_at_leastprivilege.com)
Date: 12/16/04

  • Next message: Eliyahu Goldin: "Re: http request from windows service"
    To: microsoft.public.dotnet.security
    Date: Thu, 16 Dec 2004 05:38:06 -0800
    
    

    Does the account that tries to impersonate hold the "Impersonate after Authentication" privilege?

     

     ---
     Dominick Baier - DevelopMentor
     http://www.leastprivilege.com

       nntp://news.microsoft.com/microsoft.public.dotnet.security/>

     Hi,
     
     i am using LogonUser function with LOGON32_LOGON_INTERACTIVE and other
     parameters. using DuplicateToken function with securitypermissions = 2 and
     creating WindowsIdentity object with the duplicatetoken obtained from
     DuplicateToken function.
     i am trying to impersonate but is gives error saying "unable to
     impersonate", i would like to know all the reasons why
     windowsIdentity.Impersonate() fails saying "Unable to impersonate".
     
     Thanks
     Ravi
     ravib
     
     [microsoft.public.dotnet.security]


  • Next message: Eliyahu Goldin: "Re: http request from windows service"

    Relevant Pages

    • WindowsIdentity.Impersonate() fails
      ... creating WindowsIdentity object with the duplicatetoken obtained from ... DuplicateToken function. ... i am trying to impersonate but is gives error saying "unable to ...
      (microsoft.public.dotnet.security)
    • Re: Impersonation fails when accessing remote files.
      ... "The LogonUser function attempts to log a user on to the local computer. ... > Dim impersonation As Impersonate = New Impersonate ... > Dim userStr As String = impersonation.WhoAmI ...
      (microsoft.public.dotnet.framework.aspnet.security)