|
 |
aspx thread: Re: GetRequestStream
Message #1 by "Breck Ryker" <breck_ryker@m...> on Tue, 11 Mar 2003 20:40:52
|
|
J Donahue:
I'm having the exact same problem as you were in this message.
Did you ever find a solution?
> Hi all. I'm behind a firewall trying to connect to a remote site via
H> ttpWebRequest. My simple code is as follows:
> Dim objRequest As HttpWebRequest = CType(WebRequest.Create
(> "http://xml.nada.com/default.asp"), HttpWebRequest)
o> bjRequest.Method = "POST"
o> bjRequest.ContentLength = strPost.Length
D> im myWriter As StreamWriter
> Try
> myWriter = New StreamWriter(objRequest.GetRequestStream())
> myWriter.Close()
C> atch objError As Exception
> MyErrorMsg
> Exit Sub
E> nd Try
> It errors on the objRequest.GetRequestStream as follows:
> The underlying connection was closed: Unable to connect to the remote
s> erver.
a> t System.Net.HttpWebRequest.CheckFinalStatus() at
S> ystem.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
a> t System.Net.HttpWebRequest.GetRequestStream() at
R> equests.JointInfo.DoJoint(Object sender, CommandEventArgs e) in
\> \indlenders\DiBase\Requests\Requests\JointInfo.ascx.vb:line 295
> Anyone have any idea why I'm having problems with GetRequestStream??
T> hanks!!
|
|
 |