WepApi需要注意点

  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>

webapi支持跨域请求,配置文件需要配置允许所有请求源头

原文地址:https://www.cnblogs.com/lyfingchow/p/6543762.html