November Happy Hour will be moved to Thursday December 5th.

Getting runtime error for 'HttpRuntimeCacheProvider'

Vote:
 

Hello, 

We are upgrading our webform application from optimizely version 9.9.1 to 11.15.1. During this upgrade we got below error log in event-viewer -

 Exception type: TargetInvocationException 
    Exception message: Exception has been thrown by the target of an invocation.
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

Could not load type 'EPiServer.Data.Cache.HttpRuntimeCacheProvider' from assembly 'EPiServer.Data.Cache'.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at EPiServer.Data.Internal.DataAspNetInitialization.TryGetCacheProviderFactory(EPiServerDataStoreSection dataStoreSection, Func`2& factory)
   at EPiServer.Data.Internal.DataAspNetInitialization.ConfigureContainer(ServiceConfigurationContext context)
   at EPiServer.Framework.Initialization.Internal.ModuleNode.<>c__DisplayClass4_0.<ConfigureContainer>b__0()
   at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
   at EPiServer.Framework.Initialization.Internal.ModuleNode.ConfigureContainer(ServiceConfigurationContext context)
   at EPiServer.Framework.Initialization.InitializationEngine.ConfigureCurrentModules(Boolean final)
   at EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions)
   at EPiServer.Framework.Initialization.InitializationEngine.Initialize()
   at EPiServer.Framework.Initialization.InitializationModule.<>c.<FrameworkInitialization>b__7_0(InitializationEngine e)
   at EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction)
   at EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType)
   at EPiServer.Global..ctor()
   at EPiServer.Templates.Global..ctor()

 

We reverfied referances in our project also clean+rebuild solution but no luck.

Any ideas? 

#321392
May 02, 2024 10:50
Vote:
 

Vishal,

>>>> We reverfied referances in our project

Based on the error, I'm thinking there may still be a reference to an 'old' assembly.

Can you confirm that you see EPiServer.Framework.AspNet Version 11.x being referenced in the Web.config and the .csproj files?

You should see something like this:


Web.config

<dependentAssembly>
  <assemblyIdentity name="EPiServer.Framework.AspNet" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-11.5.3.0" newVersion="11.5.3.0" />
</dependentAssembly>


{project}.csproj

<Reference Include="EPiServer.Framework.AspNet, Version=11.5.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7, processorArchitecture=MSIL">
  <HintPath>..\packages\EPiServer.Framework.AspNet.11.5.3\lib\net461\EPiServer.Framework.AspNet.dll</HintPath>
</Reference>

#321407
May 02, 2024 16:01
Vote:
 

Hello Glen,

Thank you for reply, 

In web.config, we have

<dependentAssembly>
        <assemblyIdentity name="EPiServer.Framework.AspNet" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-11.15.1.0" newVersion="11.15.1.0" />
</dependentAssembly>

In csproj file, we have 

    <Reference Include="EPiServer.Framework.AspNet, Version=11.15.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7, processorArchitecture=MSIL">
      <HintPath>..\packages\EPiServer.Framework.AspNet.11.15.1\lib\net461\EPiServer.Framework.AspNet.dll</HintPath>
    </Reference>
#321409
May 02, 2024 16:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.