0

i have windows service "monitoringservice" (account:localservice) and another service named

"uploadService" (account: local system), i installed the uploadService with setupproject and

when i start this upload service its working fine. but when i start the upload service with

the help of "monitoringservice" iam unable yo start the service iam getting the below error

"cannot open uploadService on the computer'.'"

Can any one suggest me please iam strck up with this problem

i used the following code

ServiceController sc = new ServiceController("UploadService");
                    if(sc!=null)
                    {
                        try
                        {
                            if (sc.Status != ServiceControllerStatus.Running && sc.Status != ServiceControllerStatus.StartPending)
                            {
                                sc.Start();
                            }
                        }
                        catch (Exception ex)
                        {

                        }
                    }

Thank you in advance

sree
  • 601
  • 5
  • 12
  • 33
  • Check this other question as it might be related http://stackoverflow.com/questions/1545355/stop-start-service-in-code-in-windows-7 – Claudio Redi Jul 04 '13 at 12:24
  • i have gone througth the above link already, but i didnt find exact answer to my question – sree Jul 04 '13 at 12:48

1 Answers1

0

see the following for a description of the local service account

The local service account may not be able to start your other service due to permissions, change the account on your monitoring service to local system

Mike Beeler
  • 4,081
  • 2
  • 29
  • 44
  • its a requiremnt from my client...it should be local service....can you please suggest me..how to solve this issue with local service account.. Thank you for your concern.. – sree Jul 08 '13 at 06:02
  • It cannot as local service does not have the required permissions to do what your client wants. – Mike Beeler Jul 08 '13 at 06:16
  • even though i changed it to local system it getting the same error "cannot open uploadService on the computer'.'" – sree Jul 08 '13 at 07:31