I have a .NET Core 2.0 app and have a problem with authorization. I want to use custom authorization with special requests. Header and standard default authentication.
First
Many answer above are correct but same time convoluted with other aspects of authN/authZ. What actually resolves the exception in question is this line: