Print Page | Close Window

Silverlight -How to handle nested .ExecuteAsync With DevForce

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3974
Printed Date: 07-Sep-2025 at 8:51am


Topic: Silverlight -How to handle nested .ExecuteAsync With DevForce
Posted By: PeterProva
Subject: Silverlight -How to handle nested .ExecuteAsync With DevForce
Date Posted: 04-Feb-2013 at 7:50am

I have a situation as below which gives me error and looks like timeout. Its missing some insert of records. the error is as below:

IdeaBlade.EntityModel.AsyncProcessor1.<>c__DisplayClass2.<.ctor>b__0(TArgs args) at IdeaBlade.EntityModel.AsyncProcessor1.Signal() at IdeaBlade.EntityModel.AsyncProcessor`1.b__5(Object x)

InnerException: [HttpRequestTimedOutWithoutDetail] Arguments: http://erp.altustools.com/EntityServer_efa925e26784418e93c5af893a0c9a40.svc/sl - - http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.10411.00&File=System.ServiceModel.dll&Key=HttpRequestTimedOutWithoutDetail

at IdeaBlade.EntityModel.EntityServerProxy.<>c_DisplayClass14.b_13() at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc[T](Func1 func, Boolean funcWillHandleException) at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer[T](Func1 func, Boolean funcWillHandleException) at IdeaBlade.EntityModel.EntityServerProxy.InvokeServerMethod(SessionBundle sessionBundle, ITypeWrapper entityManagerType, String typeName, String methodName, Object[] args) at IdeaBlade.EntityModel.EntityMa

 
as you see its a nested Async which the inner one im calling a stored procedure inside a loop.I tried different scenarios to bypass the problem sucha as Increasing SendTimeout in config files and....... which it didnt work. –

Any Idea how to handle it? Thx:)

Here is the code ...
  ...... .ExecuteAsync(op => { var cust =Customers.Where(p => p.IsSelected).ToList();                           
.......................... Ships.ForEach(.......                              
                      ........... EntityManager.SalesGetSalesQuery( .............. .ExecuteAsync(opn => { ................ });
                                  p.UpdateOrders(copyOrders);                    
                               copyOrders.UpdateTransferableFields();                    
                             Orders.Add(copyOrders); Save(); });
 



Replies:
Posted By: sbelini
Date Posted: 04-Feb-2013 at 4:14pm
Hi Peter,

Like mentioned at http://stackoverflow.com/questions/14613598/silverlight-how-to-handle-nested-executeasync-with-devforce - http://stackoverflow.com/questions/14613598/silverlight-how-to-handle-nested-executeasync-with-devforce the issue is not in the fact that you are running nested async queries.

Also, as mentioned in the same post above, if the timeout is happening during the StoredProc execution, it's a bug that unfortunately doesn't have a reliable workaround. We are diligently working on a fix though.

If the timeout is happening in the other query, then it's probably a timeout setting missing. In this case, I'll need the following from you:

1) Confirmation that the "non StoredProc" query is in fact the one timing out. This is important because, it's not possible to increase the transaction timeout in the StoredProdQuery.
2) All timeout settings you've done so far. (in code and config files)

sbelini.


Posted By: PeterProva
Date Posted: 06-Feb-2013 at 6:22am
Thanks sbelini:)
I have a question,Is this error client side error?Because i used try-catch different parts and i couldn't catch!!!

IdeaBlade.EntityModel.AsyncProcessor1.<>c__DisplayClass2.<.ctor>b__0(TArgs args) at IdeaBlade.EntityModel.AsyncProcessor1.Signal() at IdeaBlade.EntityModel.AsyncProcessor`1.b__5(Object x)

InnerException: [HttpRequestTimedOutWithoutDetail] Arguments: http://erp.altustools.com/EntityServer_efa925e26784418e93c5af893a0c9a40.svc/sl - - http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.10411.00&File=System.ServiceModel.dll&Key=HttpRequestTimedOutWithoutDetail

at IdeaBlade.EntityModel.EntityServerProxy.<>c_DisplayClass14.b_13() at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc[T](Func1 func, Boolean funcWillHandleException) at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer[T](Func1 func, Boolean funcWillHandleException) at IdeaBlade.EntityModel.EntityServerProxy.InvokeServerMethod(SessionBundle sessionBundle, ITypeWrapper entityManagerType, String typeName, String methodName, Object[] args) at IdeaBlade.EntityModel.EntityMa



Posted By: sbelini
Date Posted: 06-Feb-2013 at 2:39pm
Peter,

You can't try/catch async operations.

I need to ask you this once more:
Where is the timeout occurring? Is it on the non storedproc query or during the storedproc query?


Posted By: PeterProva
Date Posted: 07-Feb-2013 at 7:51am

Thanks sbelini,

well when i remove the StoredProcedureQuery it wont happend(Still slow but atleast i wont get those).


Posted By: sbelini
Date Posted: 07-Feb-2013 at 9:27am
Thanks for the update, Peter.

We are working on a fix for the StoredProc issue. (i.e. StoredProc queries not respecting the transition timeout)
I'll let you know once we have a fix.

sbelini.


Posted By: PeterProva
Date Posted: 07-Feb-2013 at 1:37pm
Thank you so much for your help:)


Posted By: sbelini
Date Posted: 19-Feb-2013 at 1:45am
Hi Peter,

The StoredProc issue has been fixed.
The fix will be in the next release of DevForce.(v6.1.12.0)

sbelini.



Print Page | Close Window