[ACCEPTED]-Enabling Cross Domain ASP.net Web API-asp.net-web-api

Accepted answer
Score: 55

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

To install from Package Manager Console, use Install-Package Microsoft.AspNet.WebApi.Cors

Score: 11

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("*", "*", "*"));

More Related questions