You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you use MediatR and EasyCaching and also use two level cache .
you will get nullreferenceException at MediatR handler layer.
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
DependencyResolutionException An exception was thrown while activating GigaLife.Questionnaire.Application.Queries.QuestionnaireTemplate.QuestionnaireTemplateQueryHandler -> GigaLife.Questionnaire.Repository.QuestionnaireTemplateRepository -> EasyCaching.Interceptor.Castle.EasyCachingInterceptor -> λ:EasyCaching.Core.IHybridCachingProvider -> EasyCaching.Bus.CSRedis.DefaultCSRedisBus -> λ:EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient[] -> λ:EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient. Void Execute(Autofac.Core.Resolving.Pipeline.ResolveRequestContext, System.Action1[Autofac.Core.Resolving.Pipeline.ResolveRequestContext]) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
at Tesla.Enterprise.Core.ServiceCollectionExtension.<>c__DisplayClass0_0.b__1(Type t)
at MediatR.ServiceFactoryExtensions.GetInstance[T](ServiceFactory factory)
at MediatR.Internal.RequestHandlerBase.GetHandler[THandler](ServiceFactory factory)
NullReferenceException Object reference not set to an instance of an object. EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient b__3_0(System.IServiceProvider) at EasyCaching.Bus.CSRedis.CSRedisOptionsExtension.<>c.b__3_0(IServiceProvider x)
The text was updated successfully, but these errors were encountered:
charzhao
changed the title
Wroked with MediatR framework throw nullreferenceException
1.6version Wroked with MediatR framework throw nullreferenceException
Aug 10, 2022
if you use MediatR and EasyCaching and also use two level cache .
you will get nullreferenceException at MediatR handler layer.
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
DependencyResolutionException An exception was thrown while activating GigaLife.Questionnaire.Application.Queries.QuestionnaireTemplate.QuestionnaireTemplateQueryHandler -> GigaLife.Questionnaire.Repository.QuestionnaireTemplateRepository -> EasyCaching.Interceptor.Castle.EasyCachingInterceptor -> λ:EasyCaching.Core.IHybridCachingProvider -> EasyCaching.Bus.CSRedis.DefaultCSRedisBus -> λ:EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient[] -> λ:EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient. Void Execute(Autofac.Core.Resolving.Pipeline.ResolveRequestContext, System.Action
1[Autofac.Core.Resolving.Pipeline.ResolveRequestContext]) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action
1 next)at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action
1 next) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action
1 next)at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable
1 parameters)at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
at Tesla.Enterprise.Core.ServiceCollectionExtension.<>c__DisplayClass0_0.b__1(Type t)
at MediatR.ServiceFactoryExtensions.GetInstance[T](ServiceFactory factory)
at MediatR.Internal.RequestHandlerBase.GetHandler[THandler](ServiceFactory factory)
NullReferenceException Object reference not set to an instance of an object. EasyCaching.Bus.CSRedis.EasyCachingCSRedisClient b__3_0(System.IServiceProvider) at EasyCaching.Bus.CSRedis.CSRedisOptionsExtension.<>c.b__3_0(IServiceProvider x)
The text was updated successfully, but these errors were encountered: