我们正在开发一个基于EPiServer的网站,并尝试将我们的最新版本部署到WinXP IIS6盒子上。
浏览网站时,我们得到以下堆栈跟踪
[ClassFactoryException: ClassFactory not initialized]
EPiServer.BaseLibrary.ClassFactory.get_Instance() +123
EPiServer.BaseLibrary.Context.get_Repository() +14
EPiServer.WorkflowFoundation.StorageProviders.ObjectStoreStorageProvider.VerifyCommonSchemas() +15
EPiServer.WorkflowFoundation.AspNetWorkflowManager.get_StorageProvider() +44
EPiServer.WorkflowFoundation.AspNetWorkflowManager.Initialize(Boolean lazyLoading) +589
EPiServer.WorkflowFoundation.AspNetWorkflowManager.get_InstanceHandler() +16
EPiServer.WorkflowFoundation.Workflows.ApprovalService..ctor() +93
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +261
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
EPiServer.WorkflowFoundation.WorkflowSystem.RegisterServices(IWorkflowManager manager, WorkflowSettingsElement configuration) +338
EPiServer.WorkflowFoundation.WorkflowSystem.Init(HttpApplication context) +240
System.Web.HttpApplication.InitModules() +267
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1251
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +243
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +106
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +214
我用谷歌搜索过,并访问了EPiServer论坛,但我没有找到任何具体的建议或解决方案。有没有其他人遇到这个?
罗斯
答案 0 :(得分:2)
配置文件是为IIS7编写的,但是您在Studio中的Web服务器中构建需要IIS6 sonfig文件。 我在ny EPiServer笔记中写过这篇文章 http://epiwiki.se/troubleshooting/classfactory-not-initialized
答案 1 :(得分:0)
我在这里猜测,但你是不是偶然在EPiServer 5 SP 2上进行开发并部署在EPiServer 5 SP 3上?
在EPiServer 5 SP3中,对EPiServer如何处理应用程序的初始化进行了一些重新设计。这些更改使得无法挂接Application_Start中的datafactory事件。相反,你需要首先挂钩到Application_FirstBeginRequest,然后我们有一个DataFactory实例来使用。
答案 2 :(得分:0)
绝对听起来像配置错误。正如Mattias所说,默认的web.config适用于IIS7。运行IIS6或Cassini时,这可能会导致问题。