Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • *Gurus*
Posted

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)

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • 3 weeks later...
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...