Hello. I have created a Windows Service using VB.NET.
I have followed an Microsoft MSDN article entitled "Walkthrough: Creating a
Windows Service Application in the Component Designer", to build and deploy
the component.
On installation, the setup program requests a user name and password.
Therefore, i entered in this format:
username
password
This returned an error saying username and/or password was incorrect.
I then tried:
.\Username
password
I am then presented with a different error:
"No mapping between account names and Security IDs was done"
...and, needless to say, the installation fails, and rolls back.
What am I doing wrong here?
DanL - 01 Oct 2004 16:23 GMT
I can't speak as to all the details behind why that attempt with userid and
password fails. Still figuring out the intricacies of user account management
myself.
However, try adding the line:
serviceProcessInstaller1.Account = ServiceAccount.NetworkService;
where serviceProcessInstaller is your installer, and ServiceAccount
enumeration is set to ANYTHING other than user.
DanL
> Hello. I have created a Windows Service using VB.NET.
>
[quoted text clipped - 22 lines]
>
> What am I doing wrong here?
Jerry Gray - 23 Oct 2004 00:13 GMT
I had this same exact problem. You need to add the user account to "Log
on as a service" in your policies.
Click on
Start Menu -> Settings -> Control Panel -> Administrative Tools -> Local
Security Policy.
Expand the "Local Policies" Branch
Expand the "User Rights Assignment" Branch
Right Click on "Log on as a service" and select properties
Click on "Add User or Group"
ETC. I'm sure you can take it from here.
Also, I always use the "DomainOrMachine\UserName" format for my user
ID's. Haven't tested to see if that is necessary, but it works for me.
Good Luck