WCF Timeout problem

WCF Timeout problem

Old forum URL: forums.lhotka.net/forums/t/10741.aspx


Mark Sutton posted on Thursday, October 06, 2011

From my Silverlight client I'm asynchronously calling a long-running stored procedure on the server (~25 mins). The problem I'm getting is a timeout exception at the client after 10 minutes.  

I've tried increasing the WCF client and server timeouts (receive, send, open, close) to 2 hours, but with no effect.  I'm also aware that the default inactivityTimeout for reliable sessions is 10 minutes, but I'm using BasicHttpBinding which doesn't allow reliable sessions.

I'm using CSLA 4.0.1

Can anyone shed some light on this?

 

Error:

 

System.Exception: Error Executing Calculation ---> System.Exception: Error Executing Calculation ---> Csla.DataPortalException: The HTTP request to 'http://applicationname/WcfPortal.svc' has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.

   --- End of inner exception stack trace ---

   at Business.Processing.Models.ExecuteCalculation.<ExcecuteCalculation>b__1(Object o, DataPortalResult`1 e)

   at Csla.DataPortal`1.OnExecuteCompleted(DataPortalResult`1 e)

   at Csla.DataPortal`1.proxy_ExecuteCompleted(Object sender, DataPortalResult`1 e)

   at Csla.DataPortalClient.WcfProxy`1.OnExecuteCompleted(DataPortalResult`1 e)

   at Csla.DataPortalClient.WcfProxy`1.proxy_ExecuteCompleted(Object sender, UpdateCompletedEventArgs e)

   --- End of inner exception stack trace ---

   at Business.Processing.Models.ExecuteCalculation.<ExcecuteCalculation>b__1(Object o, DataPortalResult`1 e)

   at Csla.DataPortal`1.OnExecuteCompleted(DataPortalResult`1 e)

   at Csla.DataPortal`1.proxy_ExecuteCompleted(Object sender, DataPortalResult`1 e)

   at Csla.DataPortalClient.WcfProxy`1.OnExecuteCompleted(DataPortalResult`1 e)

   at Csla.DataPortalClient.WcfProxy`1.proxy_ExecuteCompleted(Object sender, UpdateCompletedEventArgs e)

   at Csla.WcfPortal.WcfPortalClient.OnUpdateCompleted(Object state)

 

 

Client calling code

 

      var dp = new DataPortal<ExecuteCalculationCommand>();

                dp.ExecuteCompleted += (o, e) =>

                {

                    if (e.Error != null)

                    {

                        throw new Exception("Error Executing Calculation", e.Error);

                    }

                    else

                    {

                        var result = e.Object;

                        RunName = result.RunName;

                    }

                };

                dp.BeginExecute(command);

 

Mark Sutton replied on Thursday, October 06, 2011

I've found the answer.  The CSLA class Csla.DataPortalClient.WcfProxy has a DefaultBinding property with default timeouts of 10 minutes.  

These values can be re-set in the Silverlight client.

Copyright (c) Marimer LLC