cancel
Showing results for 
Search instead for 
Did you mean: 

A call to SSPI failed, function requested not supported in WPF desktop application

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

phluber
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Try adding the following before your webrequest:

 const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
 const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
 ServicePointManager.SecurityProtocol = Tls12;

 

Powered by NexWebSites.com -
Certified Authorize.net developers

View solution in original post

NexusSoftware
Trusted Contributor
2 REPLIES 2

Try adding the following before your webrequest:

 const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
 const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
 ServicePointManager.SecurityProtocol = Tls12;

 

Powered by NexWebSites.com -
Certified Authorize.net developers
NexusSoftware
Trusted Contributor

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!