ASP.NET MVC 4 跨域

<system.webServer> 



 <httpProtocol> 



 <customHeaders> 



 <add name="Access-Control-Allow-Origin" value="*" /> 



 <add name="Access-Control-Allow-Headers" value="Content-Type" /> 



 <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" /> 



 </customHeaders> 



 </httpProtocol> 

</system.webServer>

加入自定义头,亲测可以跨域调用Action

你可能感兴趣的:(asp.net)