28
Apr
2023
2023
The underlying connection was closed: An unexpected error occurred on a send.
by Shubham Batra
172
At the beginning of the application, add this code:
Constant 768 means TLS 1.1 security protocol and constant value 3072 means TLS 1.2.
ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072;