Controlling Windows Services Remotely

O

OpticTygre

Imagine this scenario:

I have 3 servers: A, B, and C. These servers are in remote locations across
the country not easily accessible. On each of these servers, I have a
windows service running, which I programmed myself. I also have a central
server at my location. Is there a way that I can change the code on my
windows services to be able to stop and start them remotely from my central
server (possibly using another program that I create). Can this be done by
re-coding and using .NET remoting? If so, how? Are there any good
tutorials showing this?

Thanks for any advice.

-Jason
 
T

Tom Shelton

Imagine this scenario:

I have 3 servers: A, B, and C. These servers are in remote locations across
the country not easily accessible. On each of these servers, I have a
windows service running, which I programmed myself. I also have a central
server at my location. Is there a way that I can change the code on my
windows services to be able to stop and start them remotely from my central
server (possibly using another program that I create). Can this be done by
re-coding and using .NET remoting? If so, how? Are there any good
tutorials showing this?

Thanks for any advice.

-Jason

I'm not sure if this helps you or not, but you can remotely control
services (as long as you have permissions to do so) using the
ServiceControler class provided in System.ServiceProcess namespace.

You would just use the constructor that takes the service name and the
machine name, and then you can Start, Stop, Pause, or send custom
commands to that service. Something to look into anyway :)
 
O

OpticTygre

Thanks for the reply, Tom. Is it possible to do that without the machine
name, and by using the IP address of the machine instead? I'll have to do
some testing to find out if this solution will work or not.

-Jason
 

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