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