问题
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