Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Windows service OnBeforeInstall method throwing exception

Windows service OnBeforeInstall method throwing exception

Scheduled Pinned Locked Moved Windows Forms
csharpwcfhostinghelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • I indian143

      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

      R Offline
      R Offline
      Ravi Sant
      wrote on last edited by
      #2

      Please refer this[^]. Hope it helps. :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups