kevbite / CompaniesHouse.NET

A simple .NET client wrapper for CompaniesHouse API
MIT License
37 stars 44 forks source link

"Authentication Failed because the remote party has closed the transport stream" Error #110

Closed wreid306 closed 5 years ago

wreid306 commented 5 years ago

Hi Kev,

Been using this for a few years now, have recently come across this error, tried updating to latest version with no joy. Any ideas?

its the SearchCompanyAsync method

image

wreid306 commented 5 years ago

Turns out this is related to TLS, Companies house have removed support for TLSv1.0, so need to make sure application used 1.1 or 1.2

in my case, adding the following to 'application start' worked (.net framework 4.7.2) (using System.Net;)

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

kevbite commented 5 years ago

@wreid306 thanks for posting the reason and solution around this issue 👍

AlwaysVbNet commented 5 years ago

@wreid306 Nice one