Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Cors not working in IIS but works in Kestrel

$
0
0

I'm using both Kestrel and IIS (as a standalone exe).

Cors is working just fine in Kestrel but not working in IIS.

It's setup to allow all:

services.AddCors(options =>
{
    options.DefaultPolicyName = CorsDefaultPolicy;
    options.AddPolicy(options.DefaultPolicyName, policy =>
    {
        policy.AllowAnyOrigin();
        policy.AllowAnyHeader();
        policy.AllowAnyMethod();
    });
});

I have no logs and nothing in Event viewer, so I have no idea what is wrong...


Viewing all articles
Browse latest Browse all 9386

Trending Articles