WebAPI跨域问题处理

  1、按照https://dzone.com/articles/access-control-allow-origin-header-and-the-aspnet文章所述,在程序中配置允许跨域请求。

                             WebAPI跨域问题处理

       但是请求依然出错。

  2、错误信息如下:

    Response to preflight request doesn‘t pass access control check: It does not have HTTP ok status.

  3、在服务器端浏览器尝试请求接口数据

    错误信息如下:

     WebAPI跨域问题处理

    解决办法:

     WebAPI跨域问题处理

    注释掉如上信息即可正常访问。

 

WebAPI跨域问题处理

上一篇:windows10 dos窗口输出卡住


下一篇:关于window无法远程连接时通过命令进行远程重启