Sitecore ASR数据库连接的配置位置



我正在尝试设置ASR以通过电子邮件发送计划报告,但这是我在日志文件中看到的错误消息。

Exception: ASR.Reports.Items.Exceptions.DatabaseNotFoundException 
Message: Exception of type 'ASR.Reports.Items.Exceptions.DatabaseNotFoundException' was thrown. 
Source: ASR.Reports 
at ASR.Reports.Scanners.DatabaseScanner.get_Database() 
at ASR.Reports.Items.QueryScanner.Scan() 
at ASR.Interface.Report.Run(Object[] parameters) 
at ASR.Commands.ScheduledExecution.runReport(Item item, Boolean force) 
at ASR.Commands.ScheduledExecution.<>c__DisplayClass4.b__1(Item i) 
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() 
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() 
at ASR.Commands.ScheduledExecution.EmailReports(Item[] itemarray, CommandItem commandItem, ScheduleItem scheduleItem) 

这没有多大意义,因为我可以通过管理界面生成报告。

在我的ASR配置中

<setting name="ASR.ConfigurationDatabase" value="master"/> 

在我的Sitecore Analytics文件中

<scheduling> 
<agent type="Sitecore.Analytics.Tasks.EmailReportsTask, Sitecore.Analytics" method="Run" interval="1:00:00"> 
DatabaseName>master 

在我的连接字符串配置中,

<add name="master" connectionString="..." ... />

我错过了什么?

ASR将使用ContentDatabase。当您手动运行报告时,您是在"shell"站点的上下文中运行的,它将默认为master。当作为计划任务运行时,站点将是"计划程序",默认情况下没有定义内容数据库。

尝试将以下内容添加到配置文件中:

<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sites>
      <site name="scheduler">
        <patch:attribute name="content">master</patch:attribute>
      </site>
   </sitecore>
</configuration>

公开怀疑这是否是ASR模块需要解决的问题。

最新更新