Reputation: 795
I've created a WCF service application containing a client, contract and a service. I use the client to call methods implemented in the service.
Is there a way to have a timer in the service and to set its interval to tick and to have a method that is executing during the time the service is being called.
I tried to create a constructor to the service (static and non-static) but it didn't work.
I thought about creating a 3rd party client, which will execute a method implemented in the service which will do what I need.
Thanks, Oded.
Upvotes: 0
Views: 520
Reputation: 65471
If you want something running while the service is called, then you could do it from the client:
You could also do it on the server side:
Note you must be carefull about error handling, otherwise you will end up with many orphaned processes.
Upvotes: 1