Your exception is at MediatR.IRequestHandler. Looks like you use the MediatR package, check the initialization code needed for MediatR to work properly.