none
Started thread missing in a WCF service RRS feed

  • Question

  • Hi all,

    I have an wcf service with a method performing a long running operation. In order to retrieve the control to the calling application, I start a thread and return back to the application, asking the user to refresh an status table to check the process status. The operation is taking more thant one hour at the moment.

    When I launch the operation, I can see the starting log but after an unknown time it seems to be aborted, as the process never gets completed. No error seems to be raised, because log files are empty. I am trying to increase any defined timeout time in order to prevent this situatio, but I can not find the good one. Could you give me a hand on this?

    Thanks in advance

    Tuesday, June 12, 2012 11:08 AM

All replies

  • Your channel is timing out and gets faulted - that's why you are not getting any response back. You can try few things

    1. You can implement the service as an asynchronous operation and defined a callback method.

    2. Implement this as an one way operation. Has an intermediary queue. When the operation invokes it a message to a queue. Then a windows service or wcf service picks up the message and process the message. While processing it periodically update the status, write to database etc. It will be more robust. Try implementing a duplex channel with pub-sub framework.


    Tanvir Huda Application Architect/Consultant http://thetechnocrate.wordpress.com/

    Wednesday, June 13, 2012 1:32 AM
  • Some questions:

    - Is there any place I can check for Faults (like event viewer)?

    - Second option is too complex for the simple artifact I am creating, but I agree it is the best option.

    - Not familiar with first option, could you show me a sample?

    Thanks!

    Wednesday, June 13, 2012 12:58 PM