Search code examples
c#windows-servicessetup-deploymentmsbuildextensionpack

How to solve "Invalid Service Account" Issue while installing win service?


I am using Msbuild Extension Pack to install windows service remotely. Every time i try to deploy my application i get this wired error:

Install Service failed with code: 'StatusInvalidServiceAccount' 

The account in remote server is set to log on as a service even though it doesn't solve the problem.

Note: This is a windows service created using Visual Studio 2010. I don't want Powershell to install this because of network issue in my environment.

Any help regarding the topic is really appriciated.


Solution

  • You need to use domain account with while deploying services to remote machine and the account need to be set to login as a service.

    Under <user>
    
    and under <Remote User>
    

    What ever use you put this user needs to be an administrator in both machines.