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

ClassFactory not initialized

Vote:
 

Since we moved the site to Windows server 2008 the fix found here

http://www.kulov.net/blogs/martin/2009/01/typeinitializationexception-in.html

for our ClassFactory problem, can not be used without getting a "Request is not available in this context"-error message. So this means that our problem with ClassFactory is back. However just occasionally. The site can run for days sometimes but then something happens that causes the site to restart and then it get into a deadlock with this error message

2009-09-22 13:17:40,446 [9] EPiServer.Web.InitializeEngine.Initialize(:0) - UnInitializeAction on the method b__18 System.TypeInitializationException: The type initializer for 'EPiServer.DataAbstraction.UnifiedPathInfo' threw an exception. ---> System.TypeInitializationException: The type initializer for 'EPiServer.CacheManager' threw an exception. ---> EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized

All I can do at this moment is to iisreset and after a few tries the site comes up again. This error also can occur if updating dll or web.config changes

This error started to occur after upgrade from EPiServer R1 SP3 to CMS R2 SP1. Read all forumposts on this issue but can't really apply none of the solutions. Our own code for the website does not hook into Global functions as one solutions points at and the site is upgraded successfully.

Our site/system is configured like this:
Windows server 2008 x64
EPiServer CMS 5.2.375.133
EPiServerMail 4.4.0.141 and EPiServerCommon hotfix applied
EPiServer Composer 3.2.5.115
Interactive Scene (Obg.CMS5 1.0.1.1, Obg.InteractiveScene.CMS5 1.3.100.23456)EPiServer Blog 5.2.375.133 with Demo templates functionality
SearchEngineSitemaps

The development environment is runned on Vista in Visual Studio 2008 and is debugged in VS Development Server. This environment does not have EPiServerMail, Composer, Interactive Scene or SearchEngineSitemaps installed.

Is there something with our code/configuration that can cause this type of error?

It seems weird that the site can run and be updated most of the times but then sometimes get in a deadlock state.

I am in desperate need of any advice on how to start debugging this problem so if anyone has anything to recommend please do.

#32880
Sep 22, 2009 15:03
Vote:
 
I had a similar issue the other day and the solution to the problem was changing the order of the httpmodules. All the modules that weren't dependent of EPiServer should be put before the module 

<add name="InitializationModule" type="EPiServer.Web.InitializationModule, EPiServer" />

So in my case I had to move all the relate+ modules above that module.

#32883
Sep 22, 2009 16:08
Vote:
 

My modules section looks like this:

<modules runAllManagedModulesForAllRequests="true">
      <add name="InitializationModule" type="EPiServer.Web.InitializationModule, EPiServer" preCondition="managedHandler" />
      <add name="Initializer" type="EPiServer.Scheduler.Initializer, EPiServer.Scheduler" preCondition="managedHandler" />
      <add name="WorkflowRuntime" type="EPiServer.WorkflowFoundation.WorkflowSystem, EPiServer.WorkflowFoundation" preCondition="managedHandler" />
      <add name="UrlRewriteModule" type="EPiServer.Web.UrlRewriteModule, EPiServer" preCondition="managedHandler" />
      <add name="EPiServerCommon" type="EPiServer.Common.Web.HttpModule, EPiServer.Common.Web" preCondition="managedHandler" />
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="managedHandler" />
      <add name="EPiServerMail" type="EPiServer.Mail.Core.Web.MailModule, EPiServer.Mail.Core.Web" preCondition="managedHandler" />
      <add name="Dropit.Extension" preCondition="managedHandler" type="Dropit.Extension.Handlers.HttpModule, Dropit.Extension" />
      <add name="KeepIdForEPiTrace" type="EPiTrace.KeepIdForDataHandler,EPiTrace" preCondition="managedHandler" />
    </modules>

Which modules should be put above the InitializationModule?

#32885
Sep 22, 2009 17:12
Vote:
 

Tried to move all modules below UrlRewriteModule above the InitializationModule. No errors has occured so far but I don't dare say that problem is solved just yet. Will try to trigger some reloads of the site to see if it hangs.

If it should solve the problem then I'm forever greatful because this issue has really bugged us for months now.

#32887
Sep 22, 2009 17:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.