hostaguy

I'm coding a service to update data sources on machines based on a time interval. No biggie. That part works.

After the service starts, another thread is started to listen to a particular port for instructions to do some predefined task. (Remember daemons )

When I install the service there is another with the same name also started, but not accessible to attach to the debugger. I'm wondering if the TcpListener tread (always running) is the culprit. I haven't been able to step into any code that could show me what's happening.

TIA

Sn



Re: Common Language Runtime Windows Service with TcpListener

Martin Xie - MSFT

Hi Hostaguy, Would you please like to give more hints
What is ¡°another with the same name¡± What is not accessible to attach the debugger What is the error then

Thanks!






Re: Common Language Runtime Windows Service with TcpListener

hostaguy

Thank you for the reply, Martin. I've been very sick.

I found the answer. When my service starts, it also starts a TCPListener thread. That thread caused what appeared to be another instance of the same service to have a grayed-out entry in the snap in with a different thread/process ID. I was later told the TCPListener was not required with all the other ways to communicate with the service and its underlying objects, so I disabled all the code and the grayed-out entry went away.

It's working well now and shuts down predictably, too.

Thanks again,

Stephen





Re: Common Language Runtime Windows Service with TcpListener

Martin Xie - MSFT

Hi hostaguy,

Sorry for no help to you.

Thank you for sharing your valuable experience with us here!Smile