title: IE9 XmlHttpRequest returns 12019 error instead of HTTP/417 response code
body: <p>I have some error processing for ajax request to WCF service on client side,</p>
  
  <pre><code> self.remove = function (dep, processingResult) {
              var data = { "id": dep };
              $.ajax({
                  url: 'my.svc/remove',
                  type: 'POST',
                  contentType: 'application/json',
                  dataType: "json",
                  cache: false,
                  data: JSON.stringify(data),
                  complete: function (e, xhr, settings) {
                      var message = self.getMessage(e.status);                
                      switch (e.status) {
                          case 200:
                              processingResult();
                              break;                  
                          case 417:
                              console.log(e.statusText);
                              radalert(message + e.statusText, null, null, "417");
                              break;
                          default:
                              {
                                  console.log(e.statusText);
                                  radalert(message, null, null, "bekey");
                              }
                      }
                  }
              });
          };
  </code></pre>
  
  <p>in some case I return error 417, but IE9 getting result with some 12019 error instead. 
  all other browsers including IE10 getting correct value.</p>
  
  <p>Why does it happens and how to fix it ?</p>
  
  <blockquote>
    <p>12019 - ERROR_INTERNET_INCORRECT_HANDLE_STATE
                   The requested operation cannot be carried out because the
                   handle supplied is not in the correct state.</p>
  </blockquote>
  
  <p>Looks like return this code is not so good practice. Am I right ?</p>
  
  <pre><code>  WebOperationContext ctx;
  //....
    ctx.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.ExpectationFailed;//417
  //...
  </code></pre>