Hello!
I'm using the following code for getting a GPRS internet connection and requesting a HTTP script on a pocket pc using VB .NET:
Dim url As New
Uri("http://www.url.de/file.php?variable1=1&variable2;=2")
Dim Req As WebRequest
Req = WebRequest.Create(url)
Dim Resp As WebResponse
Try
Resp = Req.GetResponse
Catch exc As Exception
MsgBox(exc.Message)
Exit Sub
End Try
Dim netStream As StreamReader
netStream = New StreamReader(Resp.GetResponseStream)
txtURL.Text = netStream.ReadToEnd
There is only one problem again:
The execution of the command "netStream.ReadToEnd" in the last line results
in the following error:
"Exception of type 'System.IO.IOException' in System.dll.
Additional information: invalid segment length."
The page I want to download exists, but it's not a complete HTML page, but
only a result of a script with about 30 characters. Might that be a problem
or why do you thing this error occurs?
Thanks again
I'm using the following code for getting a GPRS internet connection and requesting a HTTP script on a pocket pc using VB .NET:
Dim url As New
Uri("http://www.url.de/file.php?variable1=1&variable2;=2")
Dim Req As WebRequest
Req = WebRequest.Create(url)
Dim Resp As WebResponse
Try
Resp = Req.GetResponse
Catch exc As Exception
MsgBox(exc.Message)
Exit Sub
End Try
Dim netStream As StreamReader
netStream = New StreamReader(Resp.GetResponseStream)
txtURL.Text = netStream.ReadToEnd
There is only one problem again:
The execution of the command "netStream.ReadToEnd" in the last line results
in the following error:
"Exception of type 'System.IO.IOException' in System.dll.
Additional information: invalid segment length."
The page I want to download exists, but it's not a complete HTML page, but
only a result of a script with about 30 characters. Might that be a problem
or why do you thing this error occurs?
Thanks again