[ACCEPTED]-Enabling Cross Domain ASP.net Web API-asp.net-web-api
Accepted answer
You should install a Nuget package Microsoft.AspNet.WebApi.Cors
From 3 the menu in visual studio, go to Management 2 Packages, and then type in the name of the 1 package
Note:
To install from Package Manager Console, use Install-Package Microsoft.AspNet.WebApi.Cors
install a Nuget package `"Microsoft.AspNet.WebApi.Cors" (version="5.1.0")
Add 1 following line in your WebApiConfig.cs file
config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.