【问题标题】:Exception when starting EPiServer website启动 EPiServer 网站时出现异常
【发布时间】:2011-06-23 02:26:47
【问题描述】:

我们正在开发一个基于 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 论坛,但我没有找到任何具体的建议或解决方案。有没有其他人遇到过这种情况?

罗斯

【问题讨论】:

    标签: episerver


    【解决方案1】:

    配置文件是为 IIS7 编写的,但您在 Studio 中构建 webserver 需要一个 IIS6 Sonfig 文件。 我在 ny EPiServer 笔记中写过这个 http://epiwiki.se/troubleshooting/classfactory-not-initialized

    【讨论】:

      【解决方案2】:

      我在这里猜测一下,但是您是否偶然在 EPiServer 5 SP 2 上进行开发并在 EPiServer 5 SP 3 上进行部署?

      在 EPiServer 5 SP3 中,对 EPiServer 如何处理应用程序的初始化进行了一些改造。这些更改使得它无法挂接到 Application_Start 中的数据工厂事件。相反,您需要先挂钩 Application_FirstBeginRequest,然后我们有一个 DataFactory 的实例可以使用。

      Suggested reading

      【讨论】:

        【解决方案3】:

        听起来确实像是配置错误。正如 Mattias 所说,默认的 web.config 是针对 IIS7 的。这可能会在运行 IIS6 或 Cassini 时导致问题。

        【讨论】:

          猜你喜欢
          • 2014-03-07
          • 2016-02-23
          • 2011-08-30
          • 2013-07-25
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2015-08-02
          • 2011-10-14
          相关资源
          最近更新 更多