Re: Trying to control Services on Remote Server
Robert Lee <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
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???