Cannot access a disposed object named "System.Net.TlsStream"?

  • Thread starter Thread starter Asaf
  • Start date Start date
A

Asaf

Hi,

When I am doing a POST to a SSL URL I am getting this error on first attempt
"Cannot access a disposed object named "System.Net.TlsStream"."
After the first attempt all works fine, here is the Stack Trace

at System.Net.TlsStream.InnerWrite(Boolean async, Byte[] buffer, Int32
offset, Int32 size, AsyncCallback asyncCallback, Object asyncState)
at System.Net.TlsStream.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Connection.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean
flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.StreamWriter.Close()
at SendSMS.CTools.Post(String sURL, String sPost)
at SendSMS.CSendPelephone.SendMessages()

I have seen in the internet that others have the same problem with no
solution for this.

A Microsoft answer will be very appreciated.

Thank in advanced,
Asaf
 
Back
Top