gpt4 book ai didi

c# - Sitecore - ControllerRendering 提示 Controller "not found or does not implement IController."

转载 作者:太空狗 更新时间:2023-10-30 01:16:07 26 4
gpt4 key购买 nike

所以我创建了我的 Controller 渲染,它使用 Controller

Sitecore.Social.Twitter.Client.Mvc.Areas.Social.Controllers.TwitterConnectorController

像这样:

enter image description here

但是当我尝试访问该页面时,我收到一个错误,提示 Controller 不够 Controller :

enter image description here

但是如果我用对象查看器检查 dll,有问题的 Controller 确实继承自 IController:

enter image description here

那么,这里发生了什么?为什么我会收到此错误?

编辑:我怀疑错误消息可能只是一种症状,Sitecore 不知何故无法访问 DLL 中的 Controller 。哪些因素可能导致此行为,我该如何调试它们?

最佳答案

这个链接对我有用: http://jockstothecore.com/adventures-in-dependency-injection/

基本上,完全合格的 Controller 名称会使系统出错。我更新了我的以使用类名(减去“ Controller ”一词)和适当的操作,它解决了我的问题。

关于c# - Sitecore - ControllerRendering 提示 Controller "not found or does not implement IController.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36624936/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com