Reference:http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api Implementation: 1.创建两个项目,WebApi.WebApp,分别是MVC4 Empty.MVC4 Basic项目. 2.在WebApi项目中,添加一个Controller,template选择为Empty API controller 其代码为: using System.Net.Htt…