Note that there are some explanatory texts on larger screens.

plurals
  1. POSystem.Net's Webclient in C# won't connect to server
    primarykey
    data
    text
    <p>Is there something I need to do to get System.Net working with Microsoft Visual C# 2008 Express Edition? I can't seem to get any web type controls or classes to work at all.. the below WebClient example always throws the exception "<strong>Unable to connect to the remote server</strong>".. and consequently I can't get the WebBrowser control to load a page either.</p> <p>Here is the code (Edited):</p> <pre><code>using System; using System.Text; using System.Windows.Forms; using System.IO; using System.Net; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); using (WebClient client = new WebClient()) { string s = client.DownloadString("http://www.google.com"); this.textBox1.Text = s; } } } } </code></pre> <p>This is in a simple form with only a textbox control (with multiline set to true) in it. The exception gets thrown on the <code>DownloadString(...)</code> line. I also tried using <code>WebRequest</code>.. same exception!</p> <p>EDIT:</p> <p>I am connected to a Linksys WRT54G Router that connects directly to my cable modem. I am not behind a proxy server, although I did run <code>proxycfg -u</code> and I got:</p> <pre><code>Updated proxy settings Current WinHTTP proxy settings under: HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\ WinHttpSettings : Direct access (no proxy server). </code></pre> <p>I am using Windows XP and not running any kind of firewall. Only AVG at the moment. I'm pretty sure I shouldn't have to forward any ports or anything, but I did try forwarding port 80 to my workstation on my router. Didn't help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload