System.webserver has invalid child element "cors"

Viewed 1130

This is a completed project from my team, but i dun know why i getting this . cors in web.config

In my config.cs. This already enable cors . cors already installed in Nuget package:

public static void Register(HttpConfiguration config)
    {
        // Web API configuration and services
        
        SystemDiagnosticsTraceWriter traceWriter = config.EnableSystemDiagnosticsTracing();
        traceWriter.IsVerbose = true;
        traceWriter.MinimumLevel = TraceLevel.Debug;

        // Enable Web API routes by attribute
        config.MapHttpAttributeRoutes();

        EnableCorsAttribute cors = new EnableCorsAttribute("*","*","*");
        config.EnableCors(cors);
    }
0 Answers
Related