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

posted @ 2015-06-12 16:40  b̶i̶n̶g̶.̶  阅读(211)  评论(0编辑  收藏  举报