title: Error creating web reference
body: <p>I was trying to see how I could get a timezone based on US zip code and found a post that suggested using a <a href="http://www.webservicex.net/uszip.asmx" rel="nofollow">web service</a>. I can see the methods when I view this in a browser. In VS, I started adding the web reference and used the link and clicked "Go". It finds the site and displays the available methods but won't allow me to add the reference and displays the following:</p>
  
  <p>There was an error downloading '<a href="http://www.webservicex.net/uszip.asmx/_vti_bin/ListData.svc/" rel="nofollow">http://www.webservicex.net/uszip.asmx/_vti_bin/ListData.svc/</a>$metadata'.
  The request failed with the error message:</p>
  
  <p>System.InvalidOperationException: _vti_bin/ListData.svc/$metadata Web Service method name is not valid.
     at System.Web.Services.Protocols.HttpSe</p>
  
  <p>(this is all the error I can copy/paste). I cannot contact the web site for help, they only have mailing address. I was wondering if anyopostne knows how to resolve this.</p>
  
  <p>UPDATE:</p>
  
  <p>I tried both methods and keep getting:</p>
  
  <p>System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: 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 173.201.44.188:80</p>
  
  <p>This is what I used, using both methods:</p>
  
  <pre><code>// Method 1
  WebServiceNetX.USZip ZipCoding = new WebServiceNetX.USZip();
  System.Xml.XmlNode ZipInfo = ZipCoding.GetInfoByZIP(sZip);
  string sOutput = ZipInfo.OuterXml;
  
  // Method 2
  string url = @"http://www.webservicex.net/uszip.asmx/GetInfoByZIP?USZip=" + sZip;
  System.Net.WebClient webClient = new System.Net.WebClient();
  webClient.Encoding = Encoding.UTF8;
  string result = webClient.DownloadString(url);
  </code></pre>