Gets or sets the number of milliseconds after which an active ServicePoint connection is closed.
Assembly: System (in System.dll)
Property ValueType: System.Int32
A Int32 that specifies the number of milliseconds that an active ServicePoint connection remains open. The default is -1, which allows an active ServicePoint connection to stay connected indefinitely. Set this property to 0 to force ServicePoint connections to close after servicing a request.
The value specified for a set operation is a negative number less than -1.
You can use this property to ensure that a ServicePoint object's active connections do not remain open indefinitely. This property is intended for scenarios where connections should be dropped and reestablished periodically, such as load balancing scenarios.
By default, when KeepAlive is true for a request, the MaxIdleTime property sets the time-out for closing ServicePoint connections due to inactivity. If the ServicePoint has active connections, MaxIdleTime has no effect and the connections remain open indefinitely.
Setting this value affects all connections managed by the ServicePoint object.
Available since 2.0