S
SMike
I am getting the following error when sending a first http request:
Cannot access a disposed object named "System.Net.TlsStream".
After that everything sems to be fine untill the next long idle period. The
code is below. Any helpful ideas would be appriciated.
Encoding oEnc = System.Text.Encoding.GetEncoding(1252);
oNc = new NetworkCredential(cUserName, cPassWord);
oWebReq = (HttpWebRequest) WebRequest.Create(cUrl);
oWebReq.Timeout = 30000;
oWebReq.ContentType = "text/xml";
oWebReq.Method = "POST";
oWebReq.ContentLength = bBuffer.Length;
// -- request ---
oPostStream = oWebReq.GetRequestStream();
oPostStream.Write(bBuffer,0,bBuffer.Length);
oPostStream.Close();
// -- response ---
oWebRes = (HttpWebResponse) oWebReq.GetResponse();
oResStream = new StreamReader(oWebRes.GetResponseStream(),oEnc);
cRes = oResStream.ReadToEnd();
Cannot access a disposed object named "System.Net.TlsStream".
After that everything sems to be fine untill the next long idle period. The
code is below. Any helpful ideas would be appriciated.
Encoding oEnc = System.Text.Encoding.GetEncoding(1252);
oNc = new NetworkCredential(cUserName, cPassWord);
oWebReq = (HttpWebRequest) WebRequest.Create(cUrl);
oWebReq.Timeout = 30000;
oWebReq.ContentType = "text/xml";
oWebReq.Method = "POST";
oWebReq.ContentLength = bBuffer.Length;
// -- request ---
oPostStream = oWebReq.GetRequestStream();
oPostStream.Write(bBuffer,0,bBuffer.Length);
oPostStream.Close();
// -- response ---
oWebRes = (HttpWebResponse) oWebReq.GetResponse();
oResStream = new StreamReader(oWebRes.GetResponseStream(),oEnc);
cRes = oResStream.ReadToEnd();