I am running a WebApi and a WebClient application under IIS express (localhost) and receive this error only when I run them under Chrome. It works fine under IE.
At this point I am attempting to just log in a user and I receive two error messages that I am not sure what they mean -
Failed to load resource: http://localhost:59822/api/accounts/login the server responded with a status of 401 (Unauthorized)
XMLHttpRequest cannot load http://localhost:59822/api/accounts/login. Invalid HTTP status code 401
I am running a WebApi and a WebClient application under IIS express (localhost) and receive this error only when I run them under Chrome. It works fine under IE.
At this point I am attempting to just log in a user and I receive two error messages that I am not sure what they mean -
Failed to load resource: http://localhost:59822/api/accounts/login the server responded with a status of 401 (Unauthorized)
XMLHttpRequest cannot load http://localhost:59822/api/accounts/login. Invalid HTTP status code 401
Share Improve this question asked Jul 31, 2015 at 23:23 CraigCraig 1,2252 gold badges23 silver badges58 bronze badges1 Answer
Reset to default 0This most likely happens due to the security settings in Chrome.
By default the same-origin policy is rigorously enforced.
Here is how to disable it in Chrome.