Windows service

T

Tony Johansson

Hi!

I use a user name and a password when I logg in to my personel computer.
I have set Account to User in the property for ServiceProcessInstaller.
My assembly for this service is called MonitorWebSite.exe

When I install the service I use installutit /i MonitorWebSite.exe
When I do this I get a small dialog with three textboxes.
The first one is where I enter the username.
The second is where I enter the password.
The third is where I confirm the password.

I use the same username and password in this small dialog as I do when I
logg in
but here I get an error it says
An exception occurred during installation
System.ComponentModel.Win32Exception: The accountname does not exist or is
invalid
or is the given password not valid for this account name

I know that this account and password is correct because I use them when I
logg in to the computer.

So my question is why can't I use the same username and password as I do
when I logg in to the computer ?

//Tony
 
A

Arne Vajhøj

I use a user name and a password when I logg in to my personel computer.
I have set Account to User in the property for ServiceProcessInstaller.
My assembly for this service is called MonitorWebSite.exe

When I install the service I use installutit /i MonitorWebSite.exe
When I do this I get a small dialog with three textboxes.
The first one is where I enter the username.
The second is where I enter the password.
The third is where I confirm the password.

I use the same username and password in this small dialog as I do when I
logg in
but here I get an error it says
An exception occurred during installation
System.ComponentModel.Win32Exception: The accountname does not exist or is
invalid
or is the given password not valid for this account name

I know that this account and password is correct because I use them when I
logg in to the computer.

So my question is why can't I use the same username and password as I do
when I logg in to the computer ?

This does not sound particular C# related ...

Can it be that you need to specify domain YOURDOMAIN\yourusername ?

Arne
 
A

Alberto Poblacion

Tony Johansson said:
So my question is why can't I use the same username and password as I do
when I logg in to the computer ?

Have you verified that this User has the "Log On as a Service"
permission?
 
T

Tony Johansson

Alberto Poblacion said:
Have you verified that this User has the "Log On as a Service"
permission?

It's my account and I'm an administrator on my own computer
I mean if I'm an administrator I have all the privs that is nesessary

//Tony
 
T

Tony Johansson

Tony Johansson said:
It's my account and I'm an administrator on my own computer
I mean if I'm an administrator I have all the privs that is nesessary

//Tony

It's work now because I had to add myself in a group that could run window
services

//Tony
 
J

Jeff Johnson

It's work now because I had to add myself in a group that could run window
services

In other words, you now have the "Log On as a Service" right which is
exactly what Alberto was asking about.
 

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