Massive amount of issues getting this to work.
Thought I'd put up the common issues and the solutions having wasted a day on this and being led down many false paths by other answers.
Setup :
- Web Api 2 Server
- Server configured for NTLM (Negotiate)
- Angular website hosted on a different machine or Port
- Website connects to API to do, well, stuff.
Issues :
- Basic setup and first time you run it you get
no access-control-allow-origin header is present
- Setting Cors on the server and you still get the issue
- You eventually realise that Angular isn't setting
WithCredentials
on its calls and fix this, nowGET
works butPUT
,POST
&DELETE
fail with something about pre-flights.