In UFT API test getting connection was closed error

  • Questions
  • In UFT API test getting connection was closed error
Question ID: 108488
1
0

In our API test, we’re seeing the following error, "The underlying connection was closed: An unexpected error occurred on a send." So far my troubleshooting has been fruitless. Does anyone know what is causing this and how to fix?

![alt text][1]

[1]: /storage/temp/856-connectionclosed.png

Marked as spam
Posted by (Questions: 344, Answers: 24)
Asked on July 12, 2018 7:46 pm
35 views
Answers (1)
1
Private answer

You need to make sure the Transport Layer Security is set correctly. Determine the correct setting for your service and use the below code configures to use TLS 1.0, TLS 1.1 and TLS 1.2:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12 |
System.Net.SecurityProtocolType.Tls11 |
System.Net.SecurityProtocolType.Tls;

For details on impementing see [Micro Focus Document KM01591935][1]

[1]:https://softwaresupport.softwaregrp.com/group/softwaresupport/search-result/-/facetsearch/document/KM01591935

Marked as spam
Posted by (Questions: 16, Answers: 754)
Answered on July 12, 2018 7:46 pm
Adding the code to change the TLS setting has resolved the problem.
( at July 12, 2018 7:47 pm)