Unable to communicate with SSL Web Service using X509 Client Cert

G

gardavis

This is one of those cases where it works (calling the Web Service) in a WinForm app but not in ASP.Net.

I am attempting to call a PayPal Web Service. I got the client certificate from them.

The certificate works in the WinForm app but the same code in ASP.Net fails.

I click the submit button an about a minute or so, this trap occurred:

Web Exception: System.Net.WebException: The underlying connection was closed: Could not establish secure channel for SSL/TLS. ---> System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

A second (and third...) attempt also produces a trap but a bit different and it occurs immediatly, not after a delay like the one above.


Web Exception: System.Net.WebException: The underlying connection was closed: Could not establish secure channel for SSL/TLS. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted

In order to see the warnings from SCHANNEL in the event log, I changed the EventLogging from 1 to 7 using regedit:

KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNELEventLogging = 7

I repeated the failing request and checked the "System" section in the Event Log:

Event Type: Warning
Event Source: Schannel
Event Category: None
Event ID: 36875
User: N/A

Description:The remote server has requested SSL client authentication, but no suitable client certificate could be found. An anonymous connection will be attempted. This SSL connection request may succeed or fail, depending on the server's policy settings.

This message seems to say that the PayPal Web Service has requested the certificate but my server could not find one to return

Thanks for any help!

Gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top