EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized



I've been working on Episerver for a while now, but I very often experience problems with setting up a solution due to the error "Classfactory not initialized".

For most cases it's been the connection to the database or problems with the vpp-path. I've read on some forums that it might be appool aswell. I use the appool created with the intstallation manager so it shouldn't be a problem.

This problem always occur when I try to upgrade or setting up a local solution on my computer from our repository (TortoiseSVN).

I really miss a guide in how to avoid getting this error or get to the bottom of the problem so I can figure out what is wrong.

The problem I have now is that I have a working solution on my vista workstation and I'm about to upgrade existing solution on a Win2003 server. I've done a upgrade on the existing solution to make sure the database is up to date. I have installed a basic solution without DB to get a working website in IIS and copied the solution into this directory. Then I compared the web.config from the previous solution with my local version.

And now I get the error as you can see in the bottom of this post.

In advance thanks a lot for your help!

Exception Details:

Line 1:  
Line 3:  
EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized

Source Error:

[ClassFactoryException: ClassFactory not initialized] EPiServer.BaseLibrary.ClassFactory.get_Instance() +75 EPiServer.BaseLibrary.Context.get_Current() +27 EPiServer.Globalization.ContentLanguage.get_PreferredCulture() +8 EPiServer.Globalization.SystemLanguage.LanguagePreferenceList(String priorityLanguage) +51 EPiServer.Globalization.SystemLanguage.SetCulture(String priorityLanguage) +12 EPiServer.PageBase.InitializeCulture() +61 ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in c:\EPiServer\Sites\intratest\Default.aspx:1 ASP.default_aspx.FrameworkInitialize() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7e0bae81\ac465310\App_Web_ecrtp4l8.0.cs:0 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +56 System.Web.UI.Page.ProcessRequest() +80 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7e0bae81\ac465310\App_Web_ecrtp4l8.0.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Dec 04, 2009 16:31

This error will typically occur if you copy a web.config file from Vista (which runs IIS 7.0) to a Win2003 server which has IIS 5.0. You need to adjust your server web.config file to be IIS 5.0 compatible (<system.webServer> should be <system.web> etc..).

Dec 04, 2009 20:19

It could also be that you are trying to do actions using DataFactory too early in the initialization, at least that was a problem in earlier versions of CMS 5. See http://world.episerver.com/Forum/Developer-forum/Developer-to-developer/Thread-Container/2008/8/SP3-Uppgrading-problems/ .

In that case the problem is usually intermittent (I suppose it's a timing issue) so it doesn't always appear but it might appear more often on some systems than others, even if they are running the same code. When I had the problem it only appeared in dev environment, never in production (at least not to my knowledge). Using the approach suggested in the thread above solved that problem.

Dec 05, 2009 9:30

For us this error was caused using IIS7 and EPiServer 5 R2 as the Application Pool for the website in IIS was set in the default mode of 'Integrated'.

To fix, find your application pool in IIS Manager and change the Managed Pipeline to 'Classic'

Dec 29, 2011 12:31
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.