- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to test an integration in a WPF desktop application. Whenever I call the Execute method on the createTransactionController object in the C# API, the following exception is thrown:
System.Security.Authentication.AuthenticationException occurred
HResult=0x80131501
Message=A call to SSPI failed, see inner exception.
Source=System
StackTrace:
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
Inner Exception 1:
Win32Exception: The function requested is not supported
Is there something I need to check/enable in the sandbox account or on the development PC to get this working?
I did download the SampleCode test application from GitHub and tried to execute that as well and received a 'The request was aborted: Could not create SSL/TLS secure channel' exception on the same method call.
The development machine is running Windows 10 Pro Version 1703 with Visual Studio Professional 2017 Version 4.7.02046
Solved! Go to Solution.
โ09-26-2017 12:01 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try adding the following before your webrequest:
const SslProtocols _Tls12 = (SslProtocols)0x00000C00; const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12; ServicePointManager.SecurityProtocol = Tls12;
Certified Authorize.net developers
โ09-26-2017 02:13 PM - edited โ09-26-2017 02:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try adding the following before your webrequest:
const SslProtocols _Tls12 = (SslProtocols)0x00000C00; const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12; ServicePointManager.SecurityProtocol = Tls12;
Certified Authorize.net developers
โ09-26-2017 02:13 PM - edited โ09-26-2017 02:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That did it. Nowhere in the sample code or sample applications did it show that code--I figured the black box API was taking care of it.
I added:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
before the Execute call and it executed just fine. On to checking the response...
Thanks for the help!
โ09-27-2017 08:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please translate the above code into VB code, if possible.
โ08-10-2024 02:37 AM