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
Currently the project targets .NET 4.5 which defaults to TLS 1.0. Unless this is overwritten, requests made by the client will be blocked by QuickPay servers since deprecation of TLS 1.0.
As a minimum the documentation should be updated to reflect this.
I tried downloading the project, update the target framework to .NET 4.5.2 and updating RestSharp to the newest version which adds support for .NET Standards 2.0 and .NET Core 2.0 (which has been asked in another issue).
Then executing: System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
before any calls are made forces the use of TLS 1.2.
This is not best practice as this enforces TLS 1.2 and not future implementations, but using .NET Framework 4.5 this is probably the best solution enforcing TLS 1.1+ is not handled server side, which for many hosts it is not.
Updating the project to target .NET 4.7 (i'm not sure whether this is possible with the current version of RestSharp as i have not looked into it) will also solve the problem as the strongest possible encryption will be chosen automatically.
Currently the project targets .NET 4.5 which defaults to TLS 1.0. Unless this is overwritten, requests made by the client will be blocked by QuickPay servers since deprecation of TLS 1.0.
As a minimum the documentation should be updated to reflect this.
I tried downloading the project, update the target framework to .NET 4.5.2 and updating RestSharp to the newest version which adds support for .NET Standards 2.0 and .NET Core 2.0 (which has been asked in another issue).
Then executing:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
before any calls are made forces the use of TLS 1.2.
This is not best practice as this enforces TLS 1.2 and not future implementations, but using .NET Framework 4.5 this is probably the best solution enforcing TLS 1.1+ is not handled server side, which for many hosts it is not.
Updating the project to target .NET 4.7 (i'm not sure whether this is possible with the current version of RestSharp as i have not looked into it) will also solve the problem as the strongest possible encryption will be chosen automatically.
See:
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls
https://blogs.perficient.com/2016/04/28/tsl-1-2-and-net-support/
The text was updated successfully, but these errors were encountered: