Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > An existing connection was forcibly closed by the remote host

Reply
Thread Tools

An existing connection was forcibly closed by the remote host

 
 
Artur
Guest
Posts: n/a
 
      09-08-2005
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.

 
Reply With Quote
 
 
 
 
GCR
Guest
Posts: n/a
 
      12-07-2005
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.

"Artur" wrote:

> 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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
An existing connection was forcibly closed by the remote host Wil Peck ASP .Net Web Services 2 01-17-2008 11:20 PM
Cassini fails with An existing connection was forcibly closed by the remote host Anbu ASP .Net 4 03-13-2007 09:06 AM
Webservice He!p - Response error: "An existing connection was forcibly closed by the remote host" even when no error in web method iKiLL ASP .Net Web Services 0 12-20-2006 04:14 PM
Webservice He!p - Response error: "An existing connection was forcibly closed by the remote host" even when no error in web method iKiLL ASP .Net 0 12-20-2006 04:14 PM
An existing connection was forcibly closed -- Unnable to find reason mirton@gmail.com Java 5 03-03-2005 11:40 PM



Advertisments