跨域设置
只需要在【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, OPTIONS" /> </customHeaders> </httpProtocol>
超级方便快捷,建议收藏起来,用到复制粘贴即可。