• 00
  • :
  • 00
  • :
  • 00

webAPI支持跨域

问题描述:

 

 添加引用:右键项目→添加nuget包

 

在:App_Start/WebApiConfig.Register中添加如下一句话

//跨域配置
config.EnableCors(new EnableCorsAttribute("*", "*", "*"));

posted @ 2017-09-11 15:03  Garson_Zhang  阅读(168)  评论(0编辑  收藏  举报