0

I am getting "could not connect ssl/tls secure channel" error while trying to call our API from Windows application. The dll used in Windows Application targets .Net framework 4.8 and it calls another dll written in .netstandard2.0. This .netstandard2.0 dll eventually uses RestSharp 108.0.2 version to make API call. I tried all the suggestions I could find in following link and so many other pages but nothing is working so far.

Here is the hierarchy of versions involved: MFC App->.Net Framework 4.8 dll->.NetStandard2.0->RestSharp108.0.2.

RestSharp: Could not create SSL/TLS secure channel

Any help here would be great. I am starting to think if the issue is related to having combination of .Net Framework and .NetStandard in the same process. I have tried all the suggestions by changing code in the .Net Framework 4.8 dll but not in the .NetStandard dll that makes the actual API call.

Just for my understanding, can someone clarify which base class library will be used in this case to make the call to api? i.e. .NetFramework4.8 or .NetStandard2.0?

More Info: This is happening on Windows 10 on client's machine. I don't have information about the build number yet. I've never used Wireshark but I can look into it. I'll put actual callstack when I get it back from client.

5
  • Please show the full error message, including innerException. Which version of Windows is this? Exact build number please. Can you set up a Wireshark trace to see the Client and Server Hellos, there may be a cipher or TLS version mismatch. Commented Sep 27, 2024 at 11:16
  • Thank you for your response. I need to ask client to install Wireshark on their machine and I'll share log, assuming that they are willing to install the tool. Commented Sep 27, 2024 at 11:33
  • Please don't paste screenshots, only text. Please give the InnerException as asked, that has more info on the exact issue. Please give the OS build number as asked. Commented Sep 27, 2024 at 11:37
  • Post the exception and code as text. Images can't be copied, googled or tested. I suspect this is the same the dozen or more duplicates though, and the inner exception either says the server's certificate is invalid or the code is trying to hard-code the wrong TLS version Commented Sep 27, 2024 at 12:02
  • 1
    not in the .NetStandard dll that makes the actual API call the call is made by .NET Framework classes. .NET Standard code can't run by itself. The actual calls are mapped to the underlying runtime and libraries. Since 10.7 RestSharp actually uses HttpClient underneath Commented Sep 27, 2024 at 12:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.