what is wrong?

Salat

Regular
Joined
Mar 5, 2002
Messages
81
Location
Poland, Silesia
I use this code... everything look and work almost fine but I do not recive data from "www.gpw.com.pl" but from my local serwer site "www.texasnet.pl" why? I don't get it...

Code:
        Dim s As IO.StreamReader
        Dim w As New Net.WebClient()
        s = New IO.StreamReader(w.OpenRead("http://www.gpw.com.pl"))
        TextBox1.Text = s.ReadToEnd

thanks for help
 
I don't know why that would download data from the wrong site. I use a different snippet to download stuff from HTTP locations though, perhaps this one would work a little differently:

Visual Basic:
Dim wcDownload As New System.Net.WebClient()
Dim bytDatabuffer As Byte() = wcDownload.DownloadData(strURL)
Dim strDatabuffer As String = System.Text.Encoding.ASCII.GetString(bytDatabuffer)
 
Sorry, I have no idea what could cause this. Especially not if it works in your browser. .NET certainly shouldn't be doing anything that IE isn't when it downloads data.
 
I've found the problem. It's the proxy settings of my system. I don't know why but every other internet applications work fine without setting it before (IE, MOZILLA, etc.) I thinks they have their own proxy settings... but how can I allow my application's user to set it. I mean what control(or something else) do this, and how?

thanks for help. Sa³at
 
Back
Top