在web.config文件中的 system.webServer 节点下 增加如下配置
<httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="*" /> <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE" /> </customHeaders> </httpProtocol>
标签:ASP,跨域,C#,配置,MVC,NET From: https://www.cnblogs.com/19930521zhang/p/17203798.html