[RESOLVED] [02/03] Error installing my service with installutil-VBForums
Results 1 to 2 of 2

Thread: [RESOLVED] [02/03] Error installing my service with installutil

  1. #1

    Thread Starter
    Member larthur1022's Avatar
    Join Date
    Jul 2006
    Posts
    46

    Resolved [RESOLVED] [02/03] Error installing my service with installutil

    Hello,

    I completed writing the service I was working on yesterday and was able to have it install and run on my development machine under a local user account. I'm running into an issue when I move it over to the client's machine and need to install it under a domain account. When executing the command:

    installutil "C:\work\CedarsImpromptu\stisvcimp\bin\stisvcimp.exe"

    from the .NET Framework 2.0 direcory I receive the error:

    "An exception occured during the Install phase.
    System.ComponentModel.Win32Exception: No mapping between account names and security IDs was done"

    Here is the source code for the relevent portion of the service installer, please let me know if you need any more information. I found another example of this on the net but in that case it was due to the developer omitting the Account Property in the ServiceProcessInstaller object.

    Private components As System.ComponentModel.IContainer

    Friend WithEvents ServiceProcessInstaller As System.ServiceProcess.ServiceProcessInstaller
    Friend WithEvents ServiceInstaller As System.ServiceProcess.ServiceInstaller
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.ServiceProcessInstaller = New System.ServiceProcess.ServiceProcessInstaller
    Me.ServiceInstaller = New System.ServiceProcess.ServiceInstaller
    '
    'ServiceProcessInstaller
    '
    Me.ServiceProcessInstaller.Account = ServiceProcess.ServiceAccount.User
    Me.ServiceProcessInstaller.Password = "xxxxx"
    Me.ServiceProcessInstaller.Username = ".\\Domain\Username"
    '
    'ServiceInstaller
    '
    Me.ServiceInstaller.ServiceName = "stisvcimp"
    Me.ServiceInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic
    '
    'ProjectInstaller
    '
    Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller, Me.ServiceInstaller})

    End Sub

  2. #2

    Thread Starter
    Member larthur1022's Avatar
    Join Date
    Jul 2006
    Posts
    46

    Re: [02/03] Error installing my service with installutil

    Nevermind

    In testing I had to set the username as ".\username" to install the service under a local account. When installing under a domain account the syntax appears to be simply "domain\username". The service installed correctly now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.