Forum Discussion

joerg's avatar
joerg
New Contributor
9 months ago

TLS issue with RestSharp in DLL

Hello forum,

this is my first question here, so please be kind 😁

 

I generated a C# client using the swagger editor. It created a VS project which I included into my VS solution. Then I created a VS project for a standalone test application to contact the server and retrieve information from the server's REST api. In this project I refer to the IO.Swagger project. This application works very well, I can get all information I want. So far, so fine.

 

Then, in the same VS solution, I created a second project for a DLL which is supposed to be a plugin for another application. In this library project I referred to the same IO.Swagger project as in the test application, as all projects are in the same solution. Unfortunately in the library I can't get a connection to the server because the TLS negotiation fails. The RestClient gives the error message "The request was aborted: Could not create SSL/TLS secure channel.".

 

CAn soneone tell me, what's going wrong? In both cases I use exactly the same IO.Swagger library with the same authorization and credentials, I call the same API method from the same API class but the result is different. I also tried to change the RestSharp version to the ciurrent version, but nothing significantly changed.

 

 

1 Reply

  • joerg's avatar
    joerg
    New Contributor

    Really?? After one week not one single response??

    Is this question so complicated, even for RestSharp insiders?