Re: Cannot access a disposed object named "System.Net.TlsStream".
From: SMike (mmlander_at_hotmail.com)
Date: 09/15/04
- Next message: Niki Estner: "Re: How can I support the BIOS function call?"
- Previous message: Morten Wennevik: "Re: splitting with two different delimiters"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Cannot access a disposed object named "System.Net.TlsStream"."
- Next in thread: Robert Jordan: "Re: Cannot access a disposed object named "System.Net.TlsStream"."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 12:55:19 -0700
Nicholas,
Thanks for a response. You are right - https is used. can't give you a
link - it's internal. I found such a problem is being discussed, but could
not find a solution.
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in
message news:O549e$zmEHA.2096@TK2MSFTNGP15.phx.gbl...
> SMike,
>
> Is the url a secure url perhaps? The TlsStream I believe, is used to
> handle SSL socket connections (for HTTPS). Based on the code here, I
can't
> see anything that would cause this problem.
>
> Can you work up a small example, with a live URL perhaps?
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
> "SMike" <mmlander@hotmail.com> wrote in message
> news:uVxVn1zmEHA.2340@TK2MSFTNGP11.phx.gbl...
> >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();
> >
> >
>
>
- Next message: Niki Estner: "Re: How can I support the BIOS function call?"
- Previous message: Morten Wennevik: "Re: splitting with two different delimiters"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Cannot access a disposed object named "System.Net.TlsStream"."
- Next in thread: Robert Jordan: "Re: Cannot access a disposed object named "System.Net.TlsStream"."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|