You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
publicclassApiClient{publicList<MediaTypeFormatter>formatters{get;privateset;}publicApiClient(HttpClientapiClient){this.Client=apiClient;this.formatters=newList<MediaTypeFormatter>();this.formatters.Add(newJsonMediaTypeFormatter(){SerializerSettings=newNewtonsoft.Json.JsonSerializerSettings(){NullValueHandling=NullValueHandling.Ignore}});this.formatters.Add(newXmlMediaTypeFormatter());System.Net.ServicePointManager.SecurityProtocol=SecurityProtocolType.Tls12;//this line added to force TLS1.2}
With Freightview's hosting platform now requiring TLS1.2, the FV C# sample API integration doesn't work without forcing
the connection to use TLS1.2.
Long-term solution: update code to use a more modern version of .net framework.
Short-term fix: force TLS1.2
add this line:
in ApiClient.cs, like this: