views:

29

answers:

1

I have a client server set up between different computers on a network using .Net Remoting in C#. The server runs in a service that starts up when the computer turns on.

I want the client to be able to restart the computer that is running the server service and receive a status if the restart succeeded or failed.

What is the best approach?

I found three different ways to reboot the server (http://stackoverflow.com/questions/102567/how-to-shutdown-the-computer-from-c) : 1. command line shut down 2. user32.dll 3. WMI

Which Reboot method is better as far as getting Error statuses? Are there any other reboot methods I'm missing?

How Can I notify the Client about the reboot status?

Thanks

A: 

Is your service a windows service? If so, then by checking if your service is up and running (ping the service / log the service Onstart method etc), the system reboot would have been successful.

InSane