DNN 5 - DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() 抛出 NullReferenceException
作为参考发布
当重定向到自定义 DNN 5 模块中的自定义控件时,我得到
InnerException: Object reference not set to an instance of an object.
Method: DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl()
Posting as a reference
when redirecting to custom controls in custom DNN 5 module, I get
InnerException: Object reference not set to an instance of an object.
Method: DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过确保所有自定义控件都继承自 PortalModuleBase 解决了该问题
The problem was resolved by making sure that ALL custom controls inherit from PortalModuleBase
对我来说,当 .ascx.cs 控件继承自 DotNetNuke.Entities.Modules.ModuleSettingsBase 时它起作用
To me, it worked when the .ascx.cs control inherit from DotNetNuke.Entities.Modules.ModuleSettingsBase