WCF ReliableSession and Timeouts

I have a WCF service used mainly for managing documents in a repository.
I used a sample channel channel from MS so that I can upload / download huge files.
Now I have implemented a reliable session with the service, and I see strange behavior.
Here are the latency values ​​that I use.

this.SendTimeout = new TimeSpan(0,10,0);
this.OpenTimeout = new TimeSpan(0, 1, 0);
this.CloseTimeout = new TimeSpan(0, 1, 0);
this.ReceiveTimeout = new TimeSpan(0,10, 0);
reliableBe.InactivityTimeout = new TimeSpan(0,2,0);

I have the following problems:
1. If the Service is not running and running, clients will not be disconnected after OpenTimeout.

I tried this with my test client.

Scenario 1: without a reliable session: I get the following exception: Failed to connect to net.tcp: // localhost: 8788 / MediaManagementService / ep1. The connection attempt continued for a period of 00: 00: 00.9848790. TCP error code 10061: The connection could not be completed because the target computer actively rejected it 127.0.0.1:8788

This is the correct behavior since I gave OpenTimeout as 1 sec.

Scenario 2: with reliable evaluation:
I get the same exception:

Failed to connect to net.tcp: // localhost: 8788 / MediaManagementService / ep1. The connection attempt continued for a period of 00: 00: 00.9692460. Error code 10061 TCP: The connection could not be completed because the target computer actively rejected it 127.0.0.1:8788.

10 . ( SendTimeout) , , OpenTimeout = SendTimeout .
?

2: ReliableSession:
, maxReceivedMessageSize, SendTimeout ReceiveTimeout.
Chunking , .
Send ReceiveTimeout: , 10 . , , , , 10 , - , (1).

, .

+3

Source: https://habr.com/ru/post/1731252/


All Articles