title: No connection could be made because the target machine actively refused it
body: <p>I'm trying to do a web request from a webpage and I'm having problem on production server.</p>
  
  <p>The web application is a intranet web site with this configuration on web.config:</p>
  
  <pre><code>&lt;authentication mode="Windows" /&gt;
  </code></pre>
  
  <p>I use it to get the domain user authentication. </p>
  
  <p>Now I'm trying to load a web page to parse some information, I used the code below, the error appears on the second line:</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  </code></pre>
  
  <p>The error message is:</p>
  
  <p><strong>No connection could be made because the target machine actively refused it 64.233.163.104:80.</strong></p>
  
  <p><strong>Stack Trace:</strong> </p>
  
  <pre><code>[SocketException (0x274d): No connection could be made because the target machine actively refused it 64.233.163.104:80]
     System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +269
     System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket&amp; socket, IPAddress&amp; address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception&amp; exception) +649
  
  [WebException: Unable to connect to the remote server]
     System.Net.HttpWebRequest.GetResponse() +1126
     Fumagalli.Insight.Admin.Teste.Page_Load(Object sender, EventArgs e) +606
     System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
     System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
     System.Web.UI.Control.OnLoad(EventArgs e) +132
     System.Web.UI.Control.LoadRecursive() +66
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
  </code></pre>
  
  <p>This error don't occur with all URLs that I have tryed, I can get the response from www.yahoo.com but not from www.google.com for example.</p>
  
  <p>On my PC (Windows 7) everything allways works, I can get response from any URL using the same authentication mode (with domain controller), the problem only occur on the production server (Windows Server 2008).</p>
  
  <p>Anyone has a ideia?</p>