1.安装Microsoft.AspNet.WebApi.Cors 2.在webapiconfig中加入即可 config.EnableCors(new EnableCorsAttribute("*","*","*"));