how to enable cors options in asp.net web apis.?

我们两清 提交于 2020-12-06 15:42:04

问题


How do I enable the CORS option in asp.net WebApi? I installed the package Microsoft.AspNet.WebApi.Cors from nuget for CORS support. However, I am getting an error stating that IAppBuilder does not contain definition for app.useCors?


回答1:


Make sure you have installed the Microsoft.AspNet.WebApi.OwinSelfHost and Microsoft.Owin.Cors NuGet packages.



来源:https://stackoverflow.com/questions/41986332/how-to-enable-cors-options-in-asp-net-web-apis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!