title: HTTP POST Returns Error: 417 "Expectation Failed."
body: <p>When I try to POST to a URL it results in the following exception:</p>
  
  <blockquote>
    <p>The remote server returned an error:
    (417) Expectation Failed.</p>
  </blockquote>
  
  <p>Here's a sample code:</p>
  
  <pre><code>var client = new WebClient();
  
  var postData = new NameValueCollection();
  postData.Add("postParamName", "postParamValue");
  
  byte[] responseBytes = client.UploadValues("http://...", postData);
  string response = Encoding.UTF8.GetString(responseBytes); // (417) Expectation Failed.
  </code></pre>
  
  <p>Using an <code>HttpWebRequest/HttpWebResponse</code> pair or an <code>HttpClient</code> doesn't make a difference.</p>
  
  <p>What's causing this exception?</p>