Windows service OnBeforeInstall method throwing exception
-
Hi All, I have projectinstaller class for my windows service in C#.Net, my windows service is hosting a WCF service in it. When I run the instalutil command on the command prompt. Its throwing the below exception, what could be the reason for this. I am unable to start the service at all. Can any body please help me in this? Any sort of link or any help would be greatly appreciated.
An exception occurred during the Rollback phase of the CalculatorWindowsServiceAppl.ProjectInstaller installer.
System.ArgumentException: The savedState dictionary does not contain the expected values and might have been corrupted.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will
continue. However, the machine might not fully revert to its initial state after the rollback is complete.protected override void OnBeforeInstall(IDictionary savedState)
{
serviceInstaller1.ServiceName = "CalculatorWindowsService";base.OnBeforeInstall(savedState); String username = GetContextParameter("username"); String password = GetContextParameter("password"); String account = GetContextParameter("account"); //String username = @"talx/c-aaleem"; //String password = "mohammadathotmail"; if (!String.IsNullOrEmpty(username)) serviceProcessInstaller1.Username = username; if (!String.IsNullOrEmpty(password)) serviceProcessInstaller1.Password = password; serviceProcessInstaller1.Context.LogMessage("Any Thing");
}
Thanks & Regards, Md. Abdul Aleem NIIT technologies
modified on Friday, January 21, 2011 5:31 PM
-
Hi All, I have projectinstaller class for my windows service in C#.Net, my windows service is hosting a WCF service in it. When I run the instalutil command on the command prompt. Its throwing the below exception, what could be the reason for this. I am unable to start the service at all. Can any body please help me in this? Any sort of link or any help would be greatly appreciated.
An exception occurred during the Rollback phase of the CalculatorWindowsServiceAppl.ProjectInstaller installer.
System.ArgumentException: The savedState dictionary does not contain the expected values and might have been corrupted.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will
continue. However, the machine might not fully revert to its initial state after the rollback is complete.protected override void OnBeforeInstall(IDictionary savedState)
{
serviceInstaller1.ServiceName = "CalculatorWindowsService";base.OnBeforeInstall(savedState); String username = GetContextParameter("username"); String password = GetContextParameter("password"); String account = GetContextParameter("account"); //String username = @"talx/c-aaleem"; //String password = "mohammadathotmail"; if (!String.IsNullOrEmpty(username)) serviceProcessInstaller1.Username = username; if (!String.IsNullOrEmpty(password)) serviceProcessInstaller1.Password = password; serviceProcessInstaller1.Context.LogMessage("Any Thing");
}
Thanks & Regards, Md. Abdul Aleem NIIT technologies
modified on Friday, January 21, 2011 5:31 PM