Error:
XMLHttpRequest cannot load api
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '.....' is therefore not allowed access.
Solution:
Add to web.config:
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type, accessToken, signedInUserId, x-requested-with" />
</customHeaders>
</httpProtocol>