asp.net - Tridion 分析和个性化错误 : The user cannot be null. 请确保 WAI 配置正确

标签 asp.net tridion

我有一个 ASP.NET 页面 (index.aspx),使用从 Tridion 2011 SP1 发布的分析和个性化功能。如果用户之前查看过(通过 cat+关键字)标记为“高尔夫”的 3 个页面,则它仅显示一个动态组件演示和第二个动态组件演示。

我通过将 TBB“目标组个性化”和“激活跟踪”添加到我的默认完成操作来启动分析。我重新发布了该页面,看到它使用分析代码创建了动态 cp,一切都很顺利:

<tridion:ComponentPresentation runat="server" PageURI="tcm:8-667-64" ComponentURI="tcm:8-668" TemplateURI="tcm:8-666-32"/>
<tridion:TargetGroup runat="server" ItemURI="tcm:8-667-64">
    <tridion:Conditions runat="server" Negate="false" Operator="AND">
        <tridion:Conditions runat="server" Negate="false" Operator="OR">
            <tridion:Conditions runat="server" Negate="false" Operator="AND">
                <tridion:Condition runat="server" Type="TrackingKey" Operator="=" Negate="false" Name="Golf" Value="3"/>
                </tridion:Conditions>
            </tridion:Conditions>
    </tridion:Conditions>
    <tridion:ComponentPresentation runat="server" PageURI="tcm:8-667-64" ComponentURI="tcm:8-663" TemplateURI="tcm:8-666-32"/>  
</tridion:TargetGroup>
<tridion:IncrementKey runat="server" ItemURI="tcm:8-667-64" Name="Golf" ComponentURI="tcm:8-663"/>

问题:当我在浏览器中查看 index.aspx 时,出现错误:

用户不能为空。请确保WAI配置正确

我检查了经纪人数据库,那里没有数据。我相信我的 cm_wai_conf.xml 文件配置正确。我读过这篇文章,建议 WAI 使用我添加到 Windows 的环境变量 REMOTE_USER,但仍然没有成功。 http://sdltridionworld.com/articles/UsingPandPinDistributedEnvironments.aspx

有人曾经遇到过这个错误并可以提供帮助吗? 如有必要,我可以提供我的 cd_wai_conf.xml 文件

提前致谢,非常感谢您的帮助,这让我发疯!

编辑:添加配置文件 XML 不会在 StackOverflow 中呈现,因此我将其添加到 PasteBin 上: http://pastebin.com/tHwqhwtq

最佳答案

谢谢大家。你说得对。我的网站的 web.config 中未正确配置 WAIModule。我的网站在 IIS7 集成模式下运行,因此我配置如下:

<system.webServer>
<directoryBrowse enabled="true" />
<modules>
    <add name="TridionWAIHttpModule" type="Tridion.ContentDelivery.Web.WAI.WAIModule, Tridion.ContentDelivery" preCondition="managedHandler" />
</modules>
<validation validateIntegratedModeConfiguration="false"/></system.webServer>

这给了我一个新错误“对象引用未设置到对象的实例”。我将 AppPool 更改为经典模式并添加了以下行:

<httpModules>
    <add type="Tridion.ContentDelivery.Web.WAI.WAIModule, Tridion.ContentDelivery" name="TridionWAIHttpModule" /> 
</httpModules>

页面随后加载,分析和个性化工作 100%

非常感谢你们花时间来到这里。我希望这对将来的其他人有帮助。

关于asp.net - Tridion 分析和个性化错误 : The user cannot be null. 请确保 WAI 配置正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11674707/

相关文章:

asp.net - 加密和解密 FormsAuthenticationTicket 以验证用户身份

asp.net - 如何使(链接)按钮具有超链接功能?

Tridion 2011 - 编写自定义解析器时发布取消发布

tridion - 在具有组件链接的组件上使用 SiteEdit/TridionUI 2012 启用内联编辑

c# - 为什么在 ASP.NET 5 上更新到 beta8 后 Cors 不起作用?

c# - 如何在GridView EditTemplate中设置DropDownList的SelectedValue

c# - 无效的 ViewState/Base-64 字符串中的无效字符

tridion - 阶段提交部署发布失败

tridion - 如何在 Tridion CWA Web 应用程序中配置环境框架

asp.net - 如何在 SDL Tridion 中使用 XSLT 将站点地图 XML 文件转换为面包屑?