Attach Console to Service
Posted
by MemphiZ
on Stack Overflow
See other posts from Stack Overflow
or by MemphiZ
Published on 2010-04-01T23:01:41Z
Indexed on
2010/04/01
23:03 UTC
Read the original article
Hit count: 302
I currently have a WCF Service Library which will be started through a Console Application acting as ServiceHost. The ServiceHost starts the service and then waits with Console.ReadLine() for the "quit" command. If i do "Console.WriteLine();" in the service this will be printed to the ServiceHosts Console of course. The Service prints some information when the clients connect for example.
Is it possible to have the ServiceHost converted to a real Windows Service (to start up when the machine boots without console window) and attach or detach a command prompt (cmd.exe) or another Console Application to it when needed? For example if I want so see which clients connect from now on?
Thanks in advance!
© Stack Overflow or respective owner