D
Dick Berthold
I have been dealing with a very frustrating error.
I have been trying to communicate using https: with a server which is not
under my control. I am using HttpRequest and when I issue the
GetRequestStream call I get the following error:
System.Net.WebException: The underlying connection was closed: The request
was canceled.
---> System.IO.IOException: Unable to read data from the transport
connection.
---> System.ObjectDisposedException: Cannot access a disposed object named
"System.Net.TlsStream".
Object name: "System.Net.TlsStream".
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.TlsStream.AsyncReceiveComplete(IAsyncResult result)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
I have found lots of discussions about this problem but none seem to deal
with getting the error on the GetRequestStream. A few things:
1. The program works if I go to a different site which is under my control.
2. A simple java client can talk to the site with no problems
3. I do get back a certificate from the site in my CheckValidationResult
(interestingly I get multiple calls to that function when I am calling my own
https site but get there only once when I call the erroring site)
4. The errororing site is very security conscious..
5. I got the error before I had any certificates installed on my clien
system and it made no difference after I added a self-signed one.
I am running .NET 1.1 on windows XP.
Any help (even if only to tell me that I should post this elsewhere) will be
greatly appreciated.
I have been trying to communicate using https: with a server which is not
under my control. I am using HttpRequest and when I issue the
GetRequestStream call I get the following error:
System.Net.WebException: The underlying connection was closed: The request
was canceled.
---> System.IO.IOException: Unable to read data from the transport
connection.
---> System.ObjectDisposedException: Cannot access a disposed object named
"System.Net.TlsStream".
Object name: "System.Net.TlsStream".
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.TlsStream.AsyncReceiveComplete(IAsyncResult result)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
I have found lots of discussions about this problem but none seem to deal
with getting the error on the GetRequestStream. A few things:
1. The program works if I go to a different site which is under my control.
2. A simple java client can talk to the site with no problems
3. I do get back a certificate from the site in my CheckValidationResult
(interestingly I get multiple calls to that function when I am calling my own
https site but get there only once when I call the erroring site)
4. The errororing site is very security conscious..
5. I got the error before I had any certificates installed on my clien
system and it made no difference after I added a self-signed one.
I am running .NET 1.1 on windows XP.
Any help (even if only to tell me that I should post this elsewhere) will be
greatly appreciated.