C# – Enable CORS in Web API 2

Lets enable CORS in Web API 2 Use Nuget, Step (1). Go to: TOOLS > Library Package Manager > Package Manager Console, and type in: Install-Package Microsoft.AspNet.WebApi.Cors Step (2). Add these line in WebApiConfig.cs file which is inside App_Start folder public static void Register(HttpConfiguration config) { //enable cores var enableCorsAttribute = new EnableCorsAttribute(“*”,”Origin, Content-Type, Accept”,”GET, Read More