Workflow timeout issue RRS feed

  • Question

  • Hi,


    I need to process all the student data available in a collection (to be modified for reading from a file), each student record will be passed to two webservices. One service will do the validation and the other will do insertion in the database.


    Student Insertion service, Student Validation service is created in WCF and hosted in IIS.

    All the services are developed using Framework 3.0, VS2005(with  XP SP2).


    WF is published as a webservice(asmx) and hosted in IIS.


    WF has the following activities.

    1. WebserviceInput

    2. WhileActivity includes SequenceActivity as childactivity.

    2.a) SequenceActivity includes InvokeWebserviceActivity (for invoking Student Validation service hosted in IIS), IfElseActivity, InvokeWebserviceActivity (for invoking Student Insertion service)



    WF constructor initialises ArrayList with 10000 student records.


    If I call the WF service asynchronously from an aspx page, and the while Activity is in loop for 10000 times, few records(< 2000) are inserted into the database. From the Event viewer, I could see HttpException, timeout error  has occured in the (WF) service.


    Total time taken for servicing the request was less than 3 min. 


    Could anyone please suggest me how to avoid the timeout error and propagating the error to client side. I have used WebserviceFault instead of WebserviceOutput but no error has occured in the client side.


    Thanks in advance.

    Friday, August 17, 2007 8:19 AM


  • Are you getting WebException: The operation has timed out?  Have you tried increasing the WebServiceProxy.Timeout from the default of 100000 milliseconds?  You can set it to a more realistic value, like 900000 for 15 minutes, all the way up to System.Threading.Timeout.Infinite.  Use the following in your InvokeWorkflowActivity’s Invoking handler:


    ((webServiceReferenceName.ServiceName)e.WebServiceProxy).Timeout = 900000;


    How are you calling the workflow web service?  If this doesn’t help, can you post the exact error message and call stack?


    Wednesday, August 22, 2007 7:42 AM