Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized


Hi !

I'm attempting a move from 5.1.422.256 to 5.2.375.236 - and I'm getting an exception. From what I've read, this error has to do with accessing CacheManager too early.

This application of mine (which I didn't write in the first place) has all initialization code in OnLoad() methods, AFAIK.

Is OnLoad too early to access CacheManager / DataFactory ?

Stack trace:

[ClassFactoryException: ClassFactory not initialized]
   EPiServer.BaseLibrary.ClassFactory.get_Instance() +75
   EPiServer.BaseLibrary.ClassFactory.IsRegistered(Type baseType) +11
   EPiServer.CacheManager..cctor() +230

[TypeInitializationException: Typeinitialiseringen for EPiServer.CacheManager forårsaket et unntak.]
   EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternal(UrlBuilder url, Object& internalObject) +355
   EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToInternal(UrlBuilder url) +313
   EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler(Object sender, EventArgs e) +158
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version information: Microsoft .NET Framework versjon:2.0.50727.3053; ASP.NET versjon:2.0.50727.3053
Sep 24, 2009 9:37

Hi !

Immediately after posting this one, I found another useful thread regarding <httpModules> section in web.config:

This solved the first bit. Then I got an error message regarding database version, and immediately found instructions in this thread:

It now works, Thanks a lot !


Sep 24, 2009 10:29

These links are now dead, any chance you can remember what they said ;)

Aug 10, 2016 11:51

Try these links instead:

Edited, Aug 10, 2016 12:08
<p>Great, thank you.</p>
Aug 10, 2016 12:13
* 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.