Gaurav Puri

Gaurav Puri

  • NA
  • 1
  • 0

Thread.Abort in WCF Service hosted on WAS restarting Service

Nov 13 2009 8:00 AM
I have hosted a WCF service on WAS (on Windows Vista) and the protocol of the endpoint is netTcp.

In the service I am starting a thread which takes a long time to run. It runs successfully.

The problem is when ever Thread.Abort() is fired it restarts the service instead of aborting that thread only.

In the first hit from the client it starts the thread and maintains the thread in the static dictionary and then on the second hit fires the request for cancellation from client to the service, then service method calls the Thread.Abort() for that particular thread


I have tried the same using the Console host on the local machine and it's working fine and even aborting the specific thread.