Setting the Timeout for a Proxy Service Request

less than 1 minute to read

If you have requests that take a long time you may have to explicitly set the timeout of the request by configuring the timeout on the actual .NET proxy instance.

You can set the timeout for a request using the base class loProxy.oService.Timeout property on proxy. The .oService service instance is the base class that .NET provides for its Web Service proxy and it contains a number of request configuration settings that you can access. More info on this class here.

However these properties on the base class have to be accessed indirectly as this object is marked explicitly [ComVisible(false)].

The following code sets the timeout in milliseconds:

foxpro
loProxy = CREATEOBJECT("YourServiceProxy") loBridge = loProxy.oBridge *** Set the timeout to 50 seconds loBridge.SetProperty(loProxy.oService,"Timeout",50000)

© West Wind Technologies, 2004-2020 • Updated: 09/29/15
Comment or report problem with topic