【问题标题】:Sitecore 8.1- Could not resolve type name: Sitecore.Analytics.Data.ContactRepository, Sitecore.AnalyticsSitecore 8.1 - 无法解析类型名称:Sitecore.Analytics.Data.ContactRepository、Sitecore.Analytics
【发布时间】:2016-10-10 01:15:09
【问题描述】:

我使用的是 sitecore 8.1、.net mvc 4.5.2。当我访问该站点时显示以下错误。

这是我在 sitecode.analytics.config 中的设置:

<contactRepository type="Sitecore.Analytics.Data.ContactRepository, Sitecore.Analytics" singleInstance="true" />

有什么遗漏吗?如何绕过错误?

谢谢

无法解析类型名称:Sitecore.Analytics.Data.ContactRepository、Sitecore.Analytics(方法:Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert))。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Exception: Could not resolve type name: Sitecore.Analytics.Data.ContactRepository, Sitecore.Analytics (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).

Source Error: 


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[Exception: Could not resolve type name: Sitecore.Analytics.Data.ContactRepository, Sitecore.Analytics (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).]
   Sitecore.Diagnostics.Error.Raise(String error, String method) +108
   Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert) +230
   Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +41
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +100
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +451
   Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +91
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +81
   Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +82
   Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +416
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +198
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +451
   Sitecore.Configuration.Factory.CreateObject(String configPath, Boolean assert) +38
   Sitecore.Analytics.Pipelines.Loader.InitializeAutomation.Process(PipelineArgs args) +50
   (Object , Object[] ) +56
   Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) +36
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
   Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +158
   Sitecore.Nexus.Web.HttpModule.Application_Start() +165
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +498
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +534
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +352
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Could not resolve type name: Sitecore.Analytics.Data.ContactRepository, Sitecore.Analytics (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947444
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

【问题讨论】:

  • 您能否提供分析配置文件的设置。

标签: sitecore


【解决方案1】:

我尝试创建一个新的 sitecore 8.1 实例,然后将配置和 dll(以“Sitecode.Analystics”开头)复制并粘贴到项目中。有效

【讨论】:

    【解决方案2】:

    看起来Sitecore.Analytics.Data dll 文件不在您的bin 文件夹中。

    确保所有 Sitecore dll 文件都在您的网站 bin 文件夹中,包括 Sitecore.Analytics.Data

    【讨论】:

    • 我找不到文件 Sitecore.Analytics.Data.dll。 “Sitecore.Analytics.Data.ContactRepository”类型应该包含在 Sitecore.Analytics.dll 中,因为我可以通过对象浏览器找到它
    • 我尝试创建一个新的 sitecore 8.1 实例,然后将配置和 dll(以“Sitecode.Analytics”开头)复制并粘贴到项目中。它有效
    猜你喜欢
    • 1970-01-01
    • 2018-02-06
    • 1970-01-01
    • 2015-08-08
    • 1970-01-01
    • 1970-01-01
    • 2022-07-07
    • 2015-02-26
    • 2020-08-29
    相关资源
    最近更新 更多