最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Error in Chrome only: XMLHttpRequest failed to load resource - Stack Overflow

programmeradmin1浏览0评论

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 badges
Add a ment  | 

1 Answer 1

Reset to default 0

This 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.

发布评论

评论列表(0)

  1. 暂无评论