title: breezejs : configuring service for CORS
body: <p>I can access my web api service using a standard jquery ajax call:</p>
  
  <pre><code>$.ajax('http://service/method', {
  contentType: 'application/json',
  type: 'GET',
  xhrFields: {
      withCredentials: true
    }
  })
  </code></pre>
  
  <p>On the server side the webconfig file is configured as such:</p>
  
  <pre><code> &lt;customHeaders&gt;
      &lt;clear/&gt;
      &lt;add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS" /&gt;
      &lt;add name="Access-Control-Allow-Origin" value="http://localhost:1502" /&gt;
      &lt;add name="Access-Control-Allow-Headers" value="Content-Type,X-Requested-With, Authorization" /&gt;
      &lt;add name="Access-Control-Allow-Credentials" value="true" /&gt;
    &lt;/customHeaders&gt;
  </code></pre>
  
  <p>For now, I'm trying to reach the service from a local website running on port 1502.</p>
  
  <p>However, when using breeze, I don't see how I can specify the withCredential parameter, and as a result I get a 401 error.</p>