在webconfig里面加上
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
<!--PUT, DELETE, OPTIONS-->
<add name="Access-Control-Allow-Methods" value="GET, POST" />
</customHeaders>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
<!--PUT, DELETE, OPTIONS-->
<add name="Access-Control-Allow-Methods" value="GET, POST" />
</customHeaders>
<httpProtocol>