Reply
Member
Posts: 2
Registered: ‎09-26-2017
Accepted Solution

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


Accepted Solutions
Solution
Accepted by topic author phluber
‎09-27-2017 08:07 AM
Posts: 423
Topics: 0
Kudos: 88
Blog Posts: 0
Ideas: 0
Solutions: 34
Registered: ‎04-28-2017

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

[ Edited ]

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


All Replies
Solution
Accepted by topic author phluber
‎09-27-2017 08:07 AM
Posts: 423
Topics: 0
Kudos: 88
Blog Posts: 0
Ideas: 0
Solutions: 34
Registered: ‎04-28-2017

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

[ Edited ]

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
Member
Posts: 2
Registered: ‎09-26-2017

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

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!