please see the notes above. thats how we setup redis for cache manager.
but we get the error when loading page as per post#1 how to fix that?
sorry not getting this.
the issue is here in abp code when i debug.
var cacheItem = await _cacheManager.GetImpersonationCache().GetOrDefaultAsync(tokenId); if (cacheItem == null) { throw new UserFriendlyException(L("ImpersonationTokenErrorMessage")); }
when i check GetImpersonationCache(), it is returning ImpersonationCacheItem which is already marked as serialized. so not sure what to change here. public static ITypedCache<string, ImpersonationCacheItem> GetImpersonationCache(this ICacheManager cacheManager) { return cacheManager.GetCache<string, ImpersonationCacheItem>(ImpersonationCacheItem.CacheName); }
I thought the issue was the abp cache here is not distributed like redis but local, and sometimes when request was going to another server in load balancer where cache was not stored for this user session, we got null token in between request and moving this to redis would have solved this.
so i tired to move abp cache to redis and i am getting the error in post#1. so how to get around this?
we cant upgrade to version 1
how do we solve this error in a distributed environment without moving abp cache to redis??
500 Error! Impersonation token is invalid or expired!???
We have a subscription with aspnetZERO but not able to post there.
We have a project on version .7.7.2
We wanted to enable redis caching as we have a distributed environment. I read in one of your comment that there was some issue in abp.rediscache .7.7.2 and we should move to .7.8.x version We did that and updatde preinitialize in web module as below and we got no build error.
using Abp.Runtime.Caching;
namespace DC4.Web { /// <summary> /// Web module of the application. /// This is the most top and entrance module that dependens on others. /// </summary> [DependsOn( typeof(AbpWebMvcModule), typeof(DC4DataModule), typeof(DC4ApplicationModule), typeof(DC4WebApiModule), typeof(AbpRedisCacheModule))]
........................................
IocManager.Register<ICacheManager, AbpRedisCacheManager>();
After build, when i load the page, i get the following error.
ERROR 2016-10-21 09:46:58,322 [6 ] DC4.Web.Controllers.AccountController - System.Runtime.Serialization.SerializationException: Unable to find assembly 'EntityFrameworkDynamicProxies-Abp.Zero, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name) at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at Abp.RedisCache.RedisImpl.SerializeUtil.Deserialize(Byte[] data) at Abp.RedisCache.AbpRedisCache.GetOrDefault(String key) at Abp.Runtime.Caching.CacheBase.GetOrDefaultAsync(String key) at Abp.Runtime.Caching.CacheBase.<GetAsync>d__1.MoveNext()
i even tried this in dbcontext constructor but it did not work.
Configuration.ProxyCreationEnabled = false;
Please help. Thanks.