title: ajax call passing security
body: <p>I am trying to make an ajax call (using IE 10) to a page that returns json (not jsonp) but I keep getting a "401 - Unauthorized: Access is denied due to invalid credentials."  The site is setup in IIS to use "Windows Authentication", however, if I change the site to enable Anonymous Authentication the call works.  Below is the code I am using to make the call. What am I missing with my call or what do I need to change on my webserver?  The Windows Authentication is currently set up to use NTLM authentication on the Windows Auth.  </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="scripts/jquery-2.0.3.min.js"&gt;&lt;/script&gt;
      &lt;script src="scripts/base64.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          function QueryMyData() {
              var postUrl = 'http://mydevpage/storage.ashx';
              var data = 'AssetNumber=102405';
              $.support.cors = true;
              $.ajax({
                  type: "POST",
                  url: postUrl,
                  data: data,
                  dataType: 'json',
                  crossDomain: true,
                  cache: false,
                  username: "mydomain.net\\myuser",
                  password: "password",
                  beforeSend: function (xhr) {
                      xhr.withCredentials = true;
  
                  },
                  success: function (result) {
                      if (result) {
                          if (result.error)
                              alert(result.error);
                          else
                              alert(result.id);
                      }
                  },
                  error: function (xhr, ajaxOptions, thrownError) {
                      alert('Unknow Error:' + thrownError + ajaxOptions + xhr.status + " " + xhr.statusText);
                  }
              });
          }
          QueryMyData();
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>