解决方法
如果允许整个站点对外的跨域访问,则可以在改接口的网站mvc的web.config文件中对允许跨域访问的域名进行设置,如果不指定具体域名,可在<system.webServer></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>
标签:axios,跨域,vue,c#,域名,mvc
From: https://www.cnblogs.com/java-six/p/16733221.html