0

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 (How to shut down 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

Community
  • 1
  • 1
pooky
  • 31
  • 2

1 Answers1

0

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.

Jagmag
  • 10,283
  • 1
  • 34
  • 58