Thread.CurrentPrincipal is not IClaimsPrincipal
Hi, I've downloaded the source code and tried to run the application but I got value cannot be null exception. It looks like the Thread.CurrentPrincipal is set to RolePrincipal so that it cannot be used as IClaimsPrincipal. Why would that be? When I first open the solution, there was a problem with the Microsoft.IdentityModel reference so I updated it on Nuget. Do you think that caused the problem?
Deniz
Sounds like you have the role manager enabled in your application. If you don't want that, then disable it.
Disabling role manager do not resolve this issue. Any other suggestion?
Find out where in the code it's being assigned.
In 'Thinktecture.IdentityServer.Web' library, go to 'Security' folder. In 'ClaimsAuthorizeAttribute.cs' you will find 'CheckAccess' method which try to convert Thread.CurrentPrincipal as IClaimsPrincipal. but the conversation is null.
Right, so something else in your environment is also setting it.