I have a windows service that runs on a little over 100 locations. Every time I upgrade the service and do a re-install, we have about 5% of the locations get a logon failure message. The account that the service is trying to run under is a domain account that has the credentials setup in the project installer class of the service. All I have to do to fix the problem is to manually go into the service once it is installed and re-enter the password and then start the service. When I re-enter the password, the service manager will pop-up a message stating that the account is now registered to run as a service (or something like that). Does anyone know why this may occur All of the machines that this service is running on are XP with SP2. The Service was developed in .Net 1.1. Any ideas would be greatly appreciated.
Here is the section of code that sets up the service installer:
private void InitializeComponent()
{
this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
//
// serviceProcessInstaller1
//
this.serviceProcessInstaller1.Password = "password";
this.serviceProcessInstaller1.Username = "Domain\\UserName";
//
// serviceInstaller1
//
this.serviceInstaller1.DisplayName = "MyService";
this.serviceInstaller1.ServiceName = "MyService";
this.serviceInstaller1.ServicesDependedOn = new string[] {"Workstation"};
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
this.serviceInstaller1.Committed += new System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_Commited);
this.serviceInstaller1.BeforeUninstall += new System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_BeforeUninstall);
this.serviceInstaller1.BeforeRollback += new System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_BeforeRollback);
//
// ProjectInstaller
//
this.Installers.AddRange(new System.Configuration.Install.Installer[] { this.serviceProcessInstaller1, this.serviceInstaller1});
}