An existing connection was forcibly closed by the remote host

A

Artur

Dear colleagues,

I've got a problem that I cannot fix for 3 days.

I have to use remote methods, defined by WSDL at remote host, in my aspx
pages.
The methods work through SOAP protocol.

The communication works well under http protocol. However, the problem is
make it work through https using client certificate. I've got a certificate
generated at remote host, that works well when I'm trying to open remote wsdl
file using IE.

I have written a ASP.NET application in C# that works with remote methods,
so I just call the methods of my .dll file in .aspx pages.

After I tried to connect in C# code of my .dll to remote host using a given
certificate I 've go an error:

"An existing connection was forcibly closed by the remote host

System.Net.Sockets.SocketException: An existing connection was forcibly
closed by the remote host
Stack Trace:


[SocketException (0x2746): An existing connection was forcibly closed by the
remote host]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size,
SocketFlags socketFlags) +374
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) +108

[IOException: Unable to read data from the transport connection.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) +156
System.Net.TlsStream.ForceRead(Byte[] space, Int32 offset, Int32 amount)
+40
System.Net.TlsStream.ReadFullRecord(Byte[] buffer, Int32 length) +253
System.Net.TlsStream.Handshake(ProtocolToken message) +163

[WebException: The underlying connection was closed: Could not establish
secure channel for SSL/TLS.]

"
Can anyone help me? I searched many forums and MSDN knowledgebase, bur found
nothing that solved my problem.

Thanks in advance, Artur.
 
G

GCR

It's not really clear how you configured your client certificate: do remember
that client certificates deploy (together with the corresponding private key)
in the user profile, so thei'r user-specific. If you've deployed this
certificate under your account, then the ASP.net application cannot acces the
private key, and therefor the SSL handshake fails.
 

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,007
Latest member
obedient dusk

Latest Threads

Top