I have a webservice that needs to communicate with another web server via SSL
using a non-standard SSL port. The code is below, the problem arises on the
Poststream.Close line. I get an error saying "Cannot Access a Disposed object
named System.Net.TLSStream".
WRequest = CType(WebRequest.Create("https://ssl.myserver.com:5004/"),
HttpWebRequest)
WRequest.Method = "POST"
WRequest.ContentLength = TransactionString.Length + 2
WRequest.KeepAlive = True
''convert the transaction string to a Stream object
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(Chr(2) &
TransactionString & LRC)
Dim Poststream As Stream = WRequest.GetRequestStream
Poststream.Write(byteArray, 0, TransactionString.Length + 2)
Poststream.Close()
Any thoughts or possible work arounds would be greatly appreciated.
Thanks.