Sample test app no longer works due to Yubico API servers now using TLS 1.2
The sample test app no longer works as-is because it targets .NET Framework 4.5.1, which in its default configuration has issues talking with TLS 1.2 servers. See the following StackOverflow question, but ignore the selected correct answer and look at some of the other ones: https://stackoverflow.com/questions/2582036/an-existing-connection-was-forcibly-closed-by-the-remote-host
It's possible to get it to work with .NET 4.5.1 by running the following code:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
However, this changes the behavior for the whole application. Therefore its not something you want to add to the library itself, but its fine to add to the YubicoDotNetTest project.
Or the simpler solution would be to just make that project target .NET version >= 4.6
thank you for posting this olehfb -
for a .net webform app resolved following your suggestion to target >= 4.6