Error in installing Windows service developed in .NET

后端 未结 3 1338
情歌与酒
情歌与酒 2021-01-31 07:22

I have developed a windows service using C# and Visual Studio 2008. I have Windows XP SP2 installed on my machine. When I try to install the service using the

相关标签:
3条回答
  • 2021-01-31 07:50

    If the account is a local user account, try to use .\username when installutil prompts for the username and password.

    The .\ stands for local machine.

    Services require a fully qualified username (with domain), so when installing you need to be explicit about local user accounts.

    0 讨论(0)
  • 2021-01-31 07:57

    The account may also need to be given the "Log on as a service" account right; pass the SE_SERVICE_LOGON_NAME constant to the LsaAddAccountRights() API.

    0 讨论(0)
  • 2021-01-31 07:58

    I solved this by changing ServiceProcessInstaller.Account to LocalSystem, and it works for me.

    0 讨论(0)
提交回复
热议问题