<configuration>
<system.webServer>
<modules>
<add name="CultureAwareHttpModule" type="Web_SJWD.Lang.CultureAwareHttpModule" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
<!---加下面这段可以跨域--->
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<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>
</system.webServer>
</configuration>
转自:https://www.cnblogs.com/q149072205/p/11089954.html