1

i'm new in WCF(i've started learninig it today:)).

What's is maximum vaue of *Timeout arguments value in binding? Is it possible to setup it infinity?

<netTcpBinding>
        <binding  name="VeryLargeDataTcpBinding" maxReceivedMessageSize="1000000000000" transferMode="Streamed" closeTimeout="02:00:00" openTimeout="02:00:00" receiveTimeout="02:00:00" sendTimeout="02:00:00"  />
</netTcpBinding>
2xMax
  • 1,639
  • 6
  • 21
  • 41

1 Answers1

11

All of OpenTimeout, SendTimeout and ReceiveTimout are validated with the internal TimeoutHelper method:

public static bool IsTooLarge(TimeSpan timeout)
{
    return ((timeout > MaxWait) && (timeout != Infinite));
}

Where MaxWait is defaulted in the Binding Ctor to

TimeSpan.FromMilliseconds(2147483647.0);

Which I believe is almost 25 days?

Chris Baxter
  • 16,083
  • 9
  • 51
  • 72
  • +1 for relating it to MaxWait and for `Infinite`. Please, dear OP, don't use infinite or set it to 25 days... – James King Nov 19 '10 at 17:25
  • It helps setting these TimeOut values to large numbers when you are debuggin both your client & server in VS, otherwise you don't have much time when you are investigating your variables in the debugger and the timeout occurs. – huseyint Mar 08 '11 at 10:38