Try our conversational search powered by Generative AI!

Debugging CMS5 in VS2008/Win7/IIS7.5 - ClassFactory not initialized

Vote:
 

I have just upgraded my workstation to Win7/64-bit and I'm using VS2008 SP1. The thing is that I can not debug, or run, EPiServer-sites within VS2008. I get an error on the first page: ClassFactory not initialized. When I run it normally on http://localhost/ everything works fine. I can run end debug other ASP.NET websites, but even a clean installed demosite fails! (CMS 5.2.375.236/IIS7.5/Win7)

Exception Details: EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized

[ClassFactoryException: ClassFactory not initialized]
   EPiServer.BaseLibrary.ClassFactory.get_Instance() +90
   EPiServer.BaseLibrary.ClassFactory.CreateContext() +25
   EPiServer.BaseLibrary.Context.get_Current() +39
   EPiServer.Globalization.ContentLanguage.get_PreferredCulture() +30
   EPiServer.Globalization.SystemLanguage.LanguagePreferenceList(String priorityLanguage) +99
   EPiServer.Globalization.SystemLanguage.SetCulture(String priorityLanguage) +47
   EPiServer.Globalization.LanguageSelection.SetCulture() +32
   EPiServer.PageBase.InitializeCulture() +77
   ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in c:\BRUKERDATA\WEB\www.website.no\Default.aspx:1
   ASP.default_aspx.FrameworkInitialize() in c:\Users\ca\AppData\Local\Temp\Temporary ASP.NET Files\root\2148b3d3\a0625bee\App_Web_mffsn8yk.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:\Users\ca\AppData\Local\Temp\Temporary ASP.NET Files\root\2148b3d3\a0625bee\App_Web_mffsn8yk.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Does anyone else experience this behaviour? Or even better, know how to solve it?

#33273
Oct 06, 2009 20:52
Vote:
 
 

You have to change the web.config file to get EPiServer to run on an IIS7. I have wrote a note about this in my wiki http://epiwiki.se/troubleshooting/classfactory-not-initialized

#33280
Oct 07, 2009 8:36
Vote:
 
I have configured web.config already, and the page is running without problems on both my local IIS7 and on the production server Win2008/IIS7. I get this error when I try to debug the site in Visual Studio (F5), so the error is only occuring in Cassini(?).
#33336
Oct 08, 2009 10:56
Vote:
 
I usually change the properties of the project to debug in IIS instead, since Microsoft changed how IIS 7 is configured in web.config (compared to Cassini and IIS 6 which use the older model).
#33343
Oct 08, 2009 13:29
Vote:
 

Thank you! Now it works!! :)

I changed the settings as shown here: http://learn.iis.net/Content_Cache/387/Properties-Web.png
and now debugging works as it used to

 

 

 

#33345
Oct 08, 2009 13:58
* 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.