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.Clos e line. I get an error saying "Cannot Access a Disposed object
named System.Net.TLSS tream".
WRequest = CType(WebReques t.Create("https ://ssl.myserver.co m:5004/"),
HttpWebRequest)
WRequest.Method = "POST"
WRequest.Conten tLength = TransactionStri ng.Length + 2
WRequest.KeepAl ive = True
''convert the transaction string to a Stream object
Dim byteArray As Byte() = Encoding.UTF8.G etBytes(Chr(2) &
TransactionStri ng & LRC)
Dim Poststream As Stream = WRequest.GetReq uestStream
Poststream.Writ e(byteArray, 0, TransactionStri ng.Length + 2)
Poststream.Clos e()
Any thoughts or possible work arounds would be greatly appreciated.
Thanks.
using a non-standard SSL port. The code is below, the problem arises on the
Poststream.Clos e line. I get an error saying "Cannot Access a Disposed object
named System.Net.TLSS tream".
WRequest = CType(WebReques t.Create("https ://ssl.myserver.co m:5004/"),
HttpWebRequest)
WRequest.Method = "POST"
WRequest.Conten tLength = TransactionStri ng.Length + 2
WRequest.KeepAl ive = True
''convert the transaction string to a Stream object
Dim byteArray As Byte() = Encoding.UTF8.G etBytes(Chr(2) &
TransactionStri ng & LRC)
Dim Poststream As Stream = WRequest.GetReq uestStream
Poststream.Writ e(byteArray, 0, TransactionStri ng.Length + 2)
Poststream.Clos e()
Any thoughts or possible work arounds would be greatly appreciated.
Thanks.