Print Page | Close Window

Increase timeout of InvokeServerMethod

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=3397
Printed Date: 10-May-2025 at 10:45am


Topic: Increase timeout of InvokeServerMethod
Posted By: jmpinchot
Subject: Increase timeout of InvokeServerMethod
Date Posted: 19-Apr-2012 at 7:45am
How do you increase the timeout of a synchronous InvokeServerMethod call?

I've tried creating my own custom ServerProxyEvents class, but it does not seem to be called when calling a remote server method.



Replies:
Posted By: DenisK
Date Posted: 19-Apr-2012 at 5:20pm
Hi jmpinchot,

Here's a sample solution showing you how to set the binding's SendTimeout in a custom ServiceProxyEvents and what happens if the server method call from the client is within or exceeds that timeout.

Hope it helps.

http://www.ideablade.com/forum/uploads/912/Wpf_T11792.zip - uploads/912/Wpf_T11792.zip


Posted By: jmpinchot
Date Posted: 20-Apr-2012 at 12:53pm
That's what I did initially, and yes the override gets called. I guess I could by default set the TimeSpan to something larger than a minute but that would affect every call. But really what I'm looking for is the ability to set this on a per request basis. I know I can overwrite the values on an EntityQuery however, since this is an InvokeServerMethod call, I'm unsure how to proceed.


Posted By: DenisK
Date Posted: 23-Apr-2012 at 11:55am
Unfortunately, the ability to set the binding's SendTimeout on a per request basis is not available.

I'm assuming the values on EntityQuery that you were referring to is the CommandTimeout. You can't use this timeout for RPC as this is a different timeout for a different purpose.

There are different timeouts in the .NET world.

1. Database timeout - Can be set by using EntityQuery.CommandTimeout

2. Transaction timeout - Can be set by using the TransactionSettings which in turn passed into the QueryStrategy

3. WCF communication timeouts - These are the sendTimeout, receiveTimeout, etc settings in the .config file.

4. and finally IIS timeouts

Here's a section on our DRC that may help you better understand the different timeouts.  http://drc.ideablade.com/xwiki/bin/view/Documentation/understand-timeouts - http://drc.ideablade.com/xwiki/bin/view/Documentation/understand-timeouts



Print Page | Close Window