davidjrh / dnn.rediscachingprovider

This caching provider allows to use a Redis cache server or cluster within DNN Platform (formerly DotNetNuke)
MIT License
23 stars 16 forks source link

System.InvalidCastException in Azure DNN Instance #74

Open zsmithy44 opened 1 year ago

zsmithy44 commented 1 year ago

Attempting to provision new Redis cache in azure following the tutorial at this link: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-dotnet-how-to-use-azure-redis-cache#create-a-cache

Upon provisioning the cache and then updating the connectionstring to point to the public endpoint we are getting the following error below:

2023-01-27 22:11:51.817+00:00 [-][D:3][T:7][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.InvalidCastException: Unable to cast object of type 'System.Byte[]' to type 'DotNetNuke.Common.Utilities.ObjectMappingInfo'. at DotNetNuke.Common.Utilities.CBO.GetObjectMapping(Type objType) at DotNetNuke.Common.Utilities.CBO.HydrateObject(Object hydratedObject, IDataReader dr) at DotNetNuke.Common.Utilities.CBO.FillObjectFromReader(Object objObject, IDataReader dr) at DotNetNuke.Common.Utilities.CBO.CreateObjectFromReader(Type objType, IDataReader dr, Boolean closeReader) at DotNetNuke.Common.Utilities.CBO.FillListFromReader(Type objType, IDataReader dr, IList objList, Boolean closeReader) at DotNetNuke.Common.Utilities.CBO.FillCollection(IDataReader dr, Type objType) at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.<>c.b__19_0(CacheItemArgs c) at DotNetNuke.Common.Utilities.DataCache.GetCachedDataFromRuntimeCache(CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired)

In azure the connecting clients are rising which means I am connected correctly, but I cannot view anything on the site as it is resolving to a runtime server error. The connection string in the config is also consistent with that shown in the wiki. Please let me know if there is anything I can do to resolve this!