Re: What permissions are needed for windows service to do C# impersonation when started under a user account?

From: Daniel (softwareengineer98037_at_yahoo.com)
Date: 12/22/04

  • Next message: Daniel: "Re: is there any way to impersonate another account at the command line when logged into a windows 2000 server account via remote desktop?"
    Date: Tue, 21 Dec 2004 17:42:17 -0800
    
    

    my login code is like this:
    bool returnValue = LogonUser(userName, domainName, password,
    LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, ref tokenHandle);

    "Daniel" <softwareengineer98037@yahoo.com> wrote in message
    news:eLsr3375EHA.1260@TK2MSFTNGP12.phx.gbl...
    >
    >
    > I have a windows service that impersonates another account fine when it
    runs
    > under system account but fails to impersonate when run under a user
    account.
    > What permissions must the windows service user account have inorder to do
    > impersonation?
    >
    > the error i get is:
    >
    > System.ComponentModel.Win32Exception: Access is denied
    > at myService.Service1.impersonatetest(String domain, String login,
    String
    > password, String path)
    > at myService.Service1.OnStart(String[] args)
    >
    >


  • Next message: Daniel: "Re: is there any way to impersonate another account at the command line when logged into a windows 2000 server account via remote desktop?"

    Relevant Pages