Error: "The underlying connection was closed..." when querying the Monitor Service OData endpoint

Error: "The underlying connection was closed..." when querying the Monitor Service OData endpoint

book

Article ID: CTX245765

calendar_today

Updated On:

Description

Clients that attempt to access data OData or other Citrix Services with TLS versions 1.0 and 1.1 fail to establish a connection.

Clients using .NET Framework may raise the following error:

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Environment

Caution! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Resolution

This occurs when a client attempts to access OData using legacy TLS versions. To fix this issue, ensure that your client uses TLS 1.2 or higher.

.NET Framework 4.7 and above on Windows 8 and above use TLS 1.2 or higher by default. On older versions of windows and .NET Framework, additional configuration may be required. For more information, see https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls.