title: Unable to connect to remote server using USPS Web Tools API
body: <p>I am currently trying to use the <a href="https://www.usps.com/business/web-tools-apis/address-information-v3-1d.htm#_Toc131231398" rel="nofollow">United States Postal Service's Web Tools API</a> to validate a user's address. However, no matter what combination of information I use or technique to connect to the web service, I get the same exception: </p>
  
  <pre><code>Unable to connect to the remote service
  </code></pre>
  
  <p>With the same Inner Exception</p>
  
  <pre><code>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 56.0.34.43:443
  </code></pre>
  
  <p>I am using a C# <code>WebClient</code> object for the first time, however. Can anyone see something I'm doing wrong here? </p>
  
  <pre><code>    private const string USPS_USERID = "xxxxxxx";
      private const string BASEURL = "https://secure.shippingapis.com/ShippingAPITest.dll";
  
          try
          {
              string USPS = BASEURL + "?API=Verify&amp;XML=&lt;AddressValidateRequest USERID=\"" + USPS_USERID + "\"&gt;";
              USPS += "&lt;Address ID='0'&gt;";
              USPS += "&lt;Address1&gt;" + addressInfo[0] + "&lt;/Address1&gt;";
              USPS += "&lt;Address2&gt;" + addressInfo[1] + "&lt;/Address2&gt;";
              USPS += "&lt;City&gt;" + addressInfo[2] + "&lt;/City&gt;";
              USPS += "&lt;State&gt;" + addressInfo[3] + "&lt;/State&gt;";
              USPS += "&lt;Zip5&gt;" + addressInfo[4] + "&lt;/Zip5&gt;";
              USPS += "&lt;Zip4&gt;&lt;/Zip4&gt;";
              USPS += "&lt;/Address&gt;&lt;/AddressValidateRequest&gt;";
  
              WebClient wsClient = new WebClient();
  
              byte[] responseData = wsClient.DownloadData(USPS);
  
              string response = string.Empty;
  
              foreach (byte item in responseData)
              {
                  response += (char) item;
              }
  
              return Json(response, JsonRequestBehavior.AllowGet);
  
          }
          catch (Exception ex)
          {
              return null;
          }
  </code></pre>