I deployed my test website onto a local IIS server by publishing it to a folder and making sure I had 'Windows Authentication' selected.
The page loads but my Authorisation policies are not working and I have no idea how to see why.
services.AddAuthentication(IISDefaults.AuthenticationScheme);
services.AddAuthorization(options =>
{
options.AddPolicy("Admin", policy =>
policy.Requirements.Add(new Check(newstring [] { "Admin" })));
options.AddPolicy("User", policy =>
policy.Requirements.Add(new Check(newstring[] { "User" })));
});
services.AddTransient<IClaimsTransformation, CustomClaimsTransformer>();
I can see that my user Claims were successful, and I can navigate to pages without a decorator, but I cannot see items with a
[Authorize(Policy = "Admin")] or [Authorize(Policy = "User")]
decorator.
I tried attaching the process to visual studio, but I don't get any messages. How do I debug a CORE 2.2 site when it is running on IIS?