ServiceProcessInstaller.Account=User doesn't work

G

greg anderson

On a ServiceProcessInstaller, I set the account,
username, and password and I get the following exception.
I have made sure that the account exists and has
the "logon as a service" privilege.

{"No mapping between account names and security IDs was
done" }
[System.ComponentModel.Win32Exception]:
{System.ComponentModel.Win32Exception}
System.Object: {System.ComponentModel.Win32Exception}
_COMPlusExceptionCode: 0xe0434f4d
_className: null
_exceptionMethod: null
_exceptionMethodString: null
_message: "No mapping between account names and
security IDs was done"
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: null
_remoteStackTraceString: null
_remoteStackIndex: 0x0
_HResult: 0x80004005
_source: null
_xptrs: 0x0
_xcode: 0xe0434f4d
Message: "No mapping between account names and
security IDs was done"
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at
System.ServiceProcess.ServiceProcessInstaller.GetAccountSid
(String accountName)
at System.ServiceProcess.ServiceProcessInstaller.Install
(IDictionary stateSaver)
at System.Configuration.Install.Installer.Install
(IDictionary stateSaver)
at AntexService.Installer.Install(IDictionary save) in
f:\crosswater\software\test\antexservice\installer.cs:line
57"
HelpLink: ""
Source: "System.ServiceProcess"
HResult: 0x80004005
 
W

Willy Denoyette [MVP]

greg anderson said:
On a ServiceProcessInstaller, I set the account,
username, and password and I get the following exception.
I have made sure that the account exists and has
the "logon as a service" privilege.
Did you include the domain name when specifying the username?

Willy.
 
G

Greg Anderson

Yes, I listed the username as .\User
It seems to be recognizing the user, because I got
past the first error, which was the username didn't have
"logon as a service" right. So I corrected that problem
(gave the user the permission), but then I ran into the next problem in
my posting which I could find no reason
for (I.e. I can create the service with the LocalSystem account, then go
in through the GUI and set the username to .\User and it will work)
 
W

Willy Denoyette [MVP]

Greg Anderson said:
Yes, I listed the username as .\User
It seems to be recognizing the user, because I got
past the first error, which was the username didn't have
"logon as a service" right. So I corrected that problem
(gave the user the permission), but then I ran into the next problem in
my posting which I could find no reason
for (I.e. I can create the service with the LocalSystem account, then go
in through the GUI and set the username to .\User and it will work)


Only specify Username and Password not the Account property.
Username must be in the format "serverName/username" if a local account or "domainName\username" when a domain account is used.
Note that serverName must refer to the real servername not a dot.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top