views:

27

answers:

2

I am trying to determine what is the unit of time for the ADO.Net Data Services timeout property. MSDN help doesn't identify it:

http://msdn.microsoft.com/en-us/library/system.data.services.client.dataservicecontext.timeout.aspx

Can anyone confirm what the property value represents?

+1  A: 

With some testing it looks like the value determines the number of seconds before it will timeout.

eyesnz
@eyesnz, I'm pretty sure it's ms. See my answer below.
jball
I just retested my test application. The timeout value is definitely in seconds.
eyesnz
If you look at the disassembly (through Reflector) of DataServiceContext, you'll find it translates the Timeout value from seconds into milliseconds when it creates an HttpWebRequest.
Ruben
A: 

The unit should be milliseconds (however @eyesnz has not found that to be correct). According to the MSDN DataServiceContext.Timeout Property page:

This value is passed to the Timeout property of the underlying HttpWebRequest object. The value must be set before executing any query or update operations against the target data service can affect the request. The value may be changed between requests to a data service and the new value will be picked up by the next data service request.

Referring to the MSDN HtppWebRequest.Timeout Property page:

The number of milliseconds to wait before the request times out. The default value is 100,000 milliseconds (100 seconds).

jball
You are right about the documentation, but it is just not what I experience in practice. I am running VS2008 with .NET 3.5 SP1.
eyesnz
@eyesnz, strange. I'll leave this here to show what it is officially supposed to be, but your empirical tests supersede documentation...
jball
The documentation fails to mention that DataServiceContext.Timeout is indeed in seconds; it does *translate* to the Timeout property of the HttpWebRequest (which is in milliseconds).
Ruben