Hi,
I have recently upgraded from ABP v2.1 to the current version. I am finding that my error log is filled with the following error message. Please could you advise.
ERROR 2018-05-03 11:47:28,105 [15 ] ime.Caching.Memory.AbpMemoryCacheManager - System.ArgumentOutOfRangeException: The relative expiration value must be positive.
Parameter name: AbsoluteExpirationRelativeToNow
Actual value was 00:00:00.
at Microsoft.Extensions.Caching.Memory.CacheEntry.set_AbsoluteExpirationRelativeToNow(Nullable1 value) at Microsoft.Extensions.Caching.Memory.CacheExtensions.Set[TItem](IMemoryCache cache, Object key, TItem value, TimeSpan absoluteExpirationRelativeToNow) at Abp.Runtime.Caching.Memory.AbpMemoryCache.Set(String key, Object value, Nullable
1 slidingExpireTime, Nullable1 absoluteExpireTime) at Abp.Runtime.Caching.CacheBase.Get(String key, Func
2 factory)
System.ArgumentOutOfRangeException: The relative expiration value must be positive.
Parameter name: AbsoluteExpirationRelativeToNow
Actual value was 00:00:00.
at Microsoft.Extensions.Caching.Memory.CacheEntry.set_AbsoluteExpirationRelativeToNow(Nullable1 value) at Microsoft.Extensions.Caching.Memory.CacheExtensions.Set[TItem](IMemoryCache cache, Object key, TItem value, TimeSpan absoluteExpirationRelativeToNow) at Abp.Runtime.Caching.Memory.AbpMemoryCache.Set(String key, Object value, Nullable
1 slidingExpireTime, Nullable1 absoluteExpireTime) at Abp.Runtime.Caching.CacheBase.Get(String key, Func
2 factory)
Many thanks
10 Answer(s)
-
0
- Does "current version" mean ABP v3.5?
- What is your ASP.NET Zero version? ABP v3.0+ is compatible with ASP.NET Zero v4.5.0+ (v4.5.1+ for .NET Framework 4.6.1). How to migrate existing solution: https://github.com/aspnetzero/aspnet-zero/issues/96#issuecomment-268093697
- Show the full stack trace.
- Describe what you do that causes the error.
-
0
Hi,
Yes, migration to ABP 3.5.
I was previously running ABP 2.1, on Asp Net Zero 4.0
Is this not possible? Is there a guide for me to upgrade ABP from where I am?
Regards
-
0
Note that I am not looking to upgrade Asp Net Zero here. Just the ABP libraries.
-
0
try to inject ICachingConfiguration
private readonly ICachingConfiguration _cacheConfig; //... _cacheConfig.DefaultSlidingExpireTime = TimeSpan.FromHours(24);
-
0
@ PhilWynn yes it is possible. Have you also upgraded ASP.NET packages to the version ABP v3.5 reqires ?
-
0
Hi,
Yes, I have ensured that all other dependencies have been updated.
Apart from a few tweaks, all seems to be working well apart from the error message shown in my initial message. I do not know what is generating this error, but it appears on each page load. I am unsure of how to provide the full stack trace, as I am only noticing this error from the logs.
Apologies, but I am not sure how inject ICachingConfiguration will help me here. Could you give more info please.
Many thanks.
-
0
@PhilWynn do you have any cache class which doesn't come with the default template ? If so, can you share it's code ?
If not, please share your log file if there is no condidential information in it.
-
0
Hi,
I don't have any custom cache classes in use, only those provided by AspNetZero 4.0 (see screen shot attached).
[attachment=0:86rm7kyr]caching.png[/attachment:86rm7kyr]
I have attached the log file.
Regards. WebSiteLogs.zip
-
0
@PhilWynn is it possible for you to share your project via email ? If you can, please send it to <a href="mailto:[email protected]">[email protected]</a> and we will check it.
-
0
On it's way...
Thank you