Salat Posted January 15, 2003 Posted January 15, 2003 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... 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 Quote profesjonalne programowanie na zlecenie :)
*Gurus* divil Posted January 15, 2003 *Gurus* Posted January 15, 2003 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: Dim wcDownload As New System.Net.WebClient() Dim bytDatabuffer As Byte() = wcDownload.DownloadData(strURL) Dim strDatabuffer As String = System.Text.Encoding.ASCII.GetString(bytDatabuffer) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Salat Posted January 15, 2003 Author Posted January 15, 2003 I used your code but the same problem apear. Maybe it's becous of firewall, or some proxy settings? what you think Quote profesjonalne programowanie na zlecenie :)
*Gurus* divil Posted January 15, 2003 *Gurus* Posted January 15, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Salat Posted January 31, 2003 Author Posted January 31, 2003 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 Quote profesjonalne programowanie na zlecenie :)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.