Re: Trying to control Services on Remote Server
Steve Abaffy <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <00cb01c7b9b8$15b6a1c0$4123e540$@biz> |
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???