if it runs from localhost, then most likely its a firewall issue on the deployed host.
SSL connection could not be established with .Net HttpClient
wrappingduke
21
Reputation points
Hi,
Attempting to make api calls to Yelp Fusion via .Net 3.1 api but receiving the following error:
Error Message: The SSL connection could not be established, see inner exception. Source: System.Net.Http Trace: at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore
Of course, the api call to Fusion from localhost runs fine. This appears to be a cipher issue??
Also, attempted to bypass the certificate with the following code:
HttpClientHandler clientHandler = new HttpClientHandler();
clientHandler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => cert.Verify(); //{ return true; };
using (HttpClient httpClient = new HttpClient(clientHandler)) {....
Any insight on how to resolve would be greatly appreciated
Developer technologies ASP.NET ASP.NET Core
4,815 questions
Accepted answer
-
Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
2023-09-22T03:44:40.2866667+00:00