title: Unable to connect to remote server WebClient
body: <p>The inner exception: System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond</p>
  
  <p>Background: This error comes from a webservice being called. When Visual Studio is run locally it works without a hitch. When I deploy this application out to a server, hitting the same webservice, I get this error. </p>
  
  <p>What I have tried: Creating the URI from c# library rather than a using a string. Nulling out the proxy property of my WebClient object. Adding an entry in my web.config file for bypass some proxy stuff.</p>
  
  <p>Relevant code:</p>
  
  <pre><code>            try
              {
                  var uri = ConfigurationManager.AppSettings["MyUrl"] + "apiAction";
                  using (var httpClient = new WebClient())
                  {
                      httpClient.BaseAddress = uri;
  
                      httpClient.Headers.Add("content-type", "application/json; charset=utf-8");
                      var content = new
                      {
                          UserAuthorizationToken = userToken
                      };
                      var jsonObj = JsonConvert.SerializeObject(content);
  
                      var response = httpClient.UploadString(uri, jsonObj);
  
                  }
              }
  </code></pre>
  
  <p>Could anyone point me in the right direction to figuring this out? Thanks in advance</p>
  
  <p>Edit (to prevent having to dig in comments):</p>
  
  <p>The URL is verified to be correct. There are angular functions that are successfully accessing this same method in other places in the application. So, I think that there shouldn't be a firewall issue but I am sort of lost at the moment so I cannot confidently say that there isn't. I can also remote into this server</p>