- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TLS 1.2 Issue -tetsing on sandbox
I'm trying to create some test transactions on sandbox. I have IIS 10.0 express and .net 4.6 and i got the error saying that the existing connection was forcibly closed by the remote host. Do we have to do any code changes to fix this?
โ07-19-2017 08:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try adding the following at the beginning of the function where you make a webrequest:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
Certified Authorize.net developers

โ07-19-2017 08:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry this did not help.
โ07-19-2017 09:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Certified Authorize.net developers

โ07-19-2017 09:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it is targeting 4.0. I cannot use SecurityProtocolType.Tls12 and SecurityProtocolType.Tls11. I can only use SecurityProtocolType.Tls and which is TLS 1.0 so it cannot connect
โ07-19-2017 10:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Target >net Framework 4.5
โ07-19-2017 10:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Certified Authorize.net developers

โ07-19-2017 10:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It got fixed with this code
const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
ServicePointManager.SecurityProtocol = Tls12;
โ07-19-2017 11:56 AM

