引用system.web.cors [英] Referencing system.web.cors
问题描述
我想实现我的Web API CORS支持。
I'm trying to implement cors support in my Web API.
我看过一对夫妇的博客文章对这个话题,但我似乎无法找到System.Web.Cors.dll或System.Web.Http.Cors.dll
I have read a couple of blog posts on this topic, but I can't seem to find System.Web.Cors.dll or System.Web.Http.Cors.dll
有什么我需要安装?
推荐答案
创建一个 .NET 4.5 MVC项目,安装的NuGet包的Microsoft ASP.NET Web API [版]跨域支持 (搜索CORS,这将是对列表中的第一或第二位)。就是这样。
Create a .NET 4.5 MVC project, install nuget package "Microsoft ASP.NET Web API [version] Cross-Origin Support" (search for "cors" and it will be on 1st or 2nd place in list). That's it.
P.S。如果遇到错误尝试安装微软的ASP.NET Web API [版]包过(搜索的WebAPI)。
P.S. If you encounter errors try to install "Microsoft ASP.NET Web API [version]" package too (search for "WebApi").
这篇关于引用system.web.cors的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!