ASP.NET Core Identity for multiple project with IdentityServer4
问题 I have one solution with two MVC projects, which use the IdentityServer4. In one project I installed the IdentityServer4 and have full access to the database. The other project is an MVC client. When I set the [Authorize] attribute on both project all works fine, but this role attribute [Authorize(Roles = "user")] works only in project one that has the IdentityServer4, the MVC client says: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Entities.Application