There is a WCF service that is hosted in the console application, there is also a client created on WPF. At the client's request, you must do the following things:

  1. Close the server console application
  2. Start another server (another application)

How can this be done?

Upd While the client performs other operations the server executes the ReadLine command

  • From the console with the server, launch the clone, and close the console. and the clone continues to work. - Stack
  • "server executes ReadLine command" - the server should respond to requests. and his host must wait for the command. - Stack
  • the console is at a distance and, accordingly, ReadLine cannot close the console with your hands, and ReadLine in this situation does not allow the server to finish the work immediately after launch (at this time it responds to client commands - Artemiy Borodin
  • There must be an event in the server class. a host is written to it. when the server comes, oh, everything. then the server sends an event. the host catches it and closes the console. or before it starts a separate process - its own clone. - Stack
  • Uh ... Why give the client the right to overload the server? It smells like a crutch. You did not think maybe as an alternative to fix memory leaks in the server? - VladD

0