Error occured while sending POST (Form) request The underlying
connection was closed: An unexpected error occurred on a send.
System.IO.IOException: Unable to read data from the transport
connection: An existing connection was forcibly closed by the remote
host. ---> System.Net.Sockets.SocketException: An existing connection
was forcibly closed by the remote host.
The request was aborted: Could not create SSL/TLS secure channel.
I would be grateful if you could tell me what is the proper way to send a request with a chain of certificates.
In Microsoft Management Console I have added the p7b to Personal and Intermediate Certification Authorities for Local Computer, and still I get these two errors.
The problem is that your client certificates do not contain private key at all. PKCS#7 container (with .p7b file extension) is not supposed to store certificates with private keys. You need to get certificate object with valid reference to private key. The certificate may be installed in your personal certificate store (CurrentUser\My), or by importing PKCS#12 (with .pfx or .p12 file extension) container which is supposed to store certificates with private keys.
Asked in February 2016Viewed 2,789 timesVoted 6Answered 1 times