Skip to content

System.InvalidCastException in Azure DNN Instance #74

Open
@zsmithy44

Description

@zsmithy44

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      System.InvalidCastException in Azure DNN Instance · Issue #74 · davidjrh/dnn.rediscachingprovider