Re: Trying to control Services on Remote Server
Steve Abaffy <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <00d901c7b9c6$cbd16770$63743650$@biz> |
I have admin rights on the machine I am trying to manage. Is there away to do something like Controller.username = "Admin"; Controller.Password = "Password"; So the server knows who is trying to manage the machine?? -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Phil Sayers Sent: Thursday, June 28, 2007 3:38 PM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Trying to control Services on Remote Server you need to be an admin on the remote system you are trying to manage. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]]On Behalf Of Robert Lee Sent: Thursday, June 28, 2007 4:33 PM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Trying to control Services on Remote Server I would guess that you need admin privileges on the machine you are trying to control. I can control a service on my tower, but if I try to control them an another one in our building I get the same error. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Steve Abaffy Sent: Thursday, June 28, 2007 3:11 PM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Trying to control Services on Remote Server Ok, thanks, that fixed that now it errors out saying that " Cannot open Service Control Manager on computer '//ServerName'. This operation might require other privileges." Not sure what privileges I need. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Robert Lee Sent: Thursday, June 28, 2007 1:24 PM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Trying to control Services on Remote Server Steve, Is SMTP the name of the exe on the remote server? You have to actually control a registered service. For instance the mail app that handles SMTP (SomeMailApp.exe). HTH Rob -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Steve Abaffy Sent: Thursday, June 28, 2007 2:19 PM To: [email protected] Subject: [DOTNET-WINFORMS] Trying to control Services on Remote Server Hello, I have the following code: ServiceController controller = new ServiceController(); controller.MachineName = "//ServerName"; controller.ServiceName = "SMTP"; string status = controller.Status.ToString(); // This line errors out with the following error Cannot open SMTP service on computer '//ServerName'. If have tried using "Simple Mail Transfer Protocol (SMTP)" for the service name with the same result. Is there something I am overlooking here???