We've just experienced a problem that's sort of difficult to diagnose. We get the error mentioned below. We've had it before, and it's been related to problems with the global.asax file. The thing is, this time we know it's not because that file has been untouched for quite some time. We fixed the problem purely by going into IIS and recycling the application pool manually.
Are there other situations where this error could occur that relate to recycling the app pool?
Thanks for any help!
2010-01-13 12:14:46,854\t(null)\t1.2.5 Unhandled exception in ASP.NETSystem.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 at EPiServer.BaseLibrary.ClassFactory.get_Instance() at EPiServer.BaseLibrary.ClassFactory.IsRegistered(Type baseType) at EPiServer.CacheManager..cctor() --- End of inner exception stack trace --- at EPiServer.DataAbstraction.PermissionData.GetPermissionListFromCache(Permission permission) at EPiServer.Security.PrincipalInfo.IsPermitted(Permission permission) at EPiServer.Core.ExceptionManager.RenderHttpRuntimeError(Exception e) at EPiServer.Global.Global_Error(Object sender, EventArgs evt) --- End of inner exception stack trace --- at EPiServer.DataAbstraction.UnifiedPathInfo.Load(String path) at EPiServer.FileSystem.DefaultAccessControlList..ctor(String path) at EPiServer.Web.Hosting.DirectoryAccessControl..ctor(String virtualPath) at EPiServer.Web.Hosting.UnifiedDirectory.get_DirectoryAC() at EPiServer.Web.Hosting.UnifiedDirectory.QueryAccess() at EPiServer.Web.Hosting.UnifiedDirectory.QueryDistinctAccess(AccessLevel access) at EPiServer.Web.Hosting.VirtualPathVersioningProvider.GetDirectory(String virtualPath) at EPiServer.Web.Hosting.VirtualPathHandler.InitializeProviders(ProviderSettingsCollection providers) at EPiServer.Web.InitializationModule.InitializeVirtualPathProviders(VirtualPathElement vpElement) at EPiServer.Web.InitializationModule.<>c__DisplayClass32.<Initialize>b__18() at EPiServer.Web.InitializeEngine.Initialize() at EPiServer.Web.InitializationModule.Initialize(EPiServerSection config, Settings settings, ConnectionStringSettingsCollection connectionStringSettings) at EPiServer.Web.InitializationModule.<StaticInitialization>b__2() at EPiServer.Web.InitializeEngine.Initialize() at EPiServer.Web.InitializationModule.StaticInitialization() at EPiServer.Web.InitializationModule.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Have you seen this FAQ:http://world.episerver.com/en/FAQ/Items/ClassFactory-not-initialized/
Yes I've had a read of that, though we haven't upgraded our site in any way. It's always been version 5 r2.
The global.asax.cs has also not been modified since November, yet this problem is occuring quite a while down the line!
Do you have anything else in mind?
Hi Karl, Make sure that you have EPiServer.Web.InitializationModule, EPiServer enabled and its at top of all modules in your webconfig.
Also check http://epiwiki.se/troubleshooting/classfactory-not-initialized
Our solution for the problem was to put not EPiServer specific moduletags above the EPiServer specific tags in web.config.
See the Addition to Wrong web.config part on the given link above
Thanks for the replies guys, very much appreciated!
InitializationModule is currently top of my modules list, and as this problem has only happened once in 2 - 3 months of content-loading and development, is it possible that this might be a one-off? We haven't observed this error since, and it seems that nobody's noticed it happening this infrequently before? :-\