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
- Previous message: igkins: "rijndael high encryption pack"
- In reply to: Daniel: "What permissions are needed for windows service to do C# impersonation when started under a user account?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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)
>
>
- Previous message: igkins: "rijndael high encryption pack"
- In reply to: Daniel: "What permissions are needed for windows service to do C# impersonation when started under a user account?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|