Closed RHaughton closed 2 years ago
Latest code?
public interface ICurrentUser : IScopedService
ICurrentUser is already in Scoped Lifetime. Are you sure that you are using the latest code? There have been few new commits recently around this.
update your source code, the Exception Middleware registry was changed
Thanks, I somehow missed this commit. I'm already using this and manually checking all commits and applying them. is there a better way to check if all my files are up to date?
@RHaughton , are you using the Nuget Package?
Describe the bug When I Launch project I get an error.
To Reproduce Launch the project
Error: System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: Infrastructure.Middlewares.ExceptionMiddleware Lifetime: Singleton ImplementationType: Infrastructure.Middlewares.ExceptionMiddleware': Cannot consume scoped service Application.Abstractions.Services.Identity.ICurrentUser' from singleton Infrastructure.Middlewares.ExceptionMiddleware'.
I Believe the ICurrentUser should be registered in Singleton (ISingletonService).