问题:XMLHttpRequest cannot load http://192.168.1.4:9010//api/contacts. The 'Access-Control-Allow-Origin' header contains the invalid value '1'. Origin 'http://192.168.1.4:9011' is therefore not allowed access.

第一种解决方法:IIS 配置 就可以了, 选中站点后选择 Http 响应头 ,右侧选择添加,

Access-Control-Allow-Origin , 值设置

 

posted on 2018-08-19 12:28  许一朵岁月  阅读(2296)  评论(0编辑  收藏  举报