what is wrong?

Salat

Well-known member
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 dont 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 dont 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:

Code:
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 shouldnt be doing anything that IE isnt when it downloads data.
 
Ive found the problem. Its the proxy settings of my system. I dont 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 applications user to set it. I mean what control(or something else) do this, and how?

thanks for help. Sa
 
Back
Top