Reply
nu
Member
Posts: 3
Registered: ‎06-01-2017

An existing connection was forcibly closed by the remote host

[ Edited ]

Hello.

 

I'm trying to fix my test requests. For now when I'm sending a request to the 'https://apitest.authorize.net/xml/v1/request.api' I'm getting an exception.

 

[SocketException (0x2746): An existing connection was forcibly closed by the remote host]

 TLS 1.2 is enabled, Windows Server 2008 r2. Any suggestions please?

 

Thanks!

Posts: 138
Topics: 0
Kudos: 27
Blog Posts: 0
Ideas: 0
Solutions: 9
Registered: ‎04-28-2017

Re: An existing connection was forcibly closed by the remote host

Try adding the following to your application in order to see what version of TLS your schannel.dll is using:

var response = WebRequest.Create("https://www.howsmyssl.com/a/check").GetResponse();
var responseData = new StreamReader(response.GetResponseStream()).ReadToEnd();
Response.WriteLine(responseData);

If < TLS 1.2 add the following at the beginning of the function where you make a webrequest:

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

 

Powered by NexWebSites.com -
Certified Authorize.net developers
nu
Member
Posts: 3
Registered: ‎06-01-2017

Re: An existing connection was forcibly closed by the remote host

 Thank you @NexusSoftware!

 

Now I'm getting "

The client and server cannot communicate, because they do not possess a common algorithm

" error.

 

I think the reason is that I have a website running on ASP.NET 2,0 & .Net 2.0 so I should upgrade them too ASAP.

Highlighted
Posts: 138
Topics: 0
Kudos: 27
Blog Posts: 0
Ideas: 0
Solutions: 9
Registered: ‎04-28-2017

Re: An existing connection was forcibly closed by the remote host

Yes, .Net version 4.6 supports TLS 1.2 by default. Version 4.5 can be set to use TLS 1.2 using the above mentioned  technique.

Powered by NexWebSites.com -
Certified Authorize.net developers