I upgraded ASP.NET 5 to beta 8 and changed the dependency from "Microsoft.AspNet.Cors": "6.0.0-beta8".
After that, I get an error in ConfigureServices in the line
services.ConfigureCors(options => { options.AddPolicy("AllowAllOrigins", builder => builder.AllowAnyOrigin()); });
Error CS1929 "IServiceCollection" does not contain a definition for "ConfigureCors" and the best overload of the extension method "MvcCorsMvcCoreBuilderExtensions.ConfigureCors (IMvcCoreBuilder, Action) 'requires a receiver of type' IMvcCoreBuilder 'WebAPI.DNX 4.5.1 C: ... \ Start
How can I fix it and activate CORS?
source
share