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

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 MVP answer will be very appreciated.



Thank in advanced,

Asaf
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top