带有 devxpress 的 DNN 模块控制严重错误
我正在使用 DNN 模块 5.6.1,并使用 Devxpress 控件创建了一个自定义模块, 它正在 dnn 站点中安装,但是当我尝试在页面中添加模块时,我收到以下错误,
发生了严重错误。 你调用的对象是空的。
而日志是…………
程序集版本:5.6.1
门户ID:0
门户名称:我的网站
用户ID:1
用户名:主机
活动标签ID:63
ActiveTabName:TestDNN
RawURL:/dotnetnuke_new/TestDNN.aspx
绝对URL:/DotNetNuke_New/Default.aspx
AbsoluteURLReferrer:http://senthilkumar.com/dotnetnuke_new/TestDNN.aspx
UserAgent:Mozilla/5.0(Windows;U;Windows NT 5.1;en-US;rv:1.8.1.14)Gecko/20080404 Firefox/2.0.0.14 (.NET CLR 3.5.30729)
默认数据提供程序:DotNetNuke.Data.SqlDataProvider、DotNetNuke.SqlDataProvider
异常GUID:cd7a06c5-7a69-4ebf-b51e-07f70714bfe6
InnerException:未将对象引用设置为对象的实例。
文件名:
文件行号:0
文件列号:0
方法:dnn_webrater.ctrlRater.Page_Load
堆栈跟踪:
消息:DotNetNuke.Services.Exceptions.PageLoadException:未将对象引用设置为对象的实例。 ---> System.NullReferenceException:未将对象引用设置为对象的实例。在 dnn_webrater.ctrlRater.Page_Load(对象发送者,EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive( )在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive() 在System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Control.LoadRecursive() 在 System. Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- 内部异常堆栈跟踪结束 ---
来源:
注销并登录后,页面显示以下错误
错误:测试模块 1 当前不可用。 DotNetNuke.Services.Exceptions.ModuleLoadException:未将对象引用设置为对象的实例。 ---> System.NullReferenceException:未将对象引用设置为对象的实例。在 DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- 内部异常堆栈跟踪结束 ---
任何人都可以帮我修复此错误
I am using DNN module 5.6.1, and i created a custom module using Devxpress controls,
It is installing in dnn site, but when i try to add the module in a page, i getting the following Error,
A critical error has occurred.
Object reference not set to an instance of an object.
And Log is.........
AssemblyVersion: 5.6.1
PortalID: 0
PortalName: My Website
UserID: 1
UserName: host
ActiveTabID: 63
ActiveTabName: TestDNN
RawURL: /dotnetnuke_new/TestDNN.aspx
AbsoluteURL: /DotNetNuke_New/Default.aspx
AbsoluteURLReferrer: http://senthilkumar.com/dotnetnuke_new/TestDNN.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 (.NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: cd7a06c5-7a69-4ebf-b51e-07f70714bfe6
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: dnn_webrater.ctrlRater.Page_Load
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at dnn_webrater.ctrlRater.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
and after logout and login, it shows the following error on the page
Error: Test Module 1 is currently unavailable.
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() --- End of inner exception stack trace ---
Can any one please help me to fix this error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个非常普遍的错误。您可能需要查看事件日志,看看是否同时发生了与您的特定模块更相关的其他错误。调试模块以查看模块中出现的异常也很有帮助,而不是尝试展开这些堆栈跟踪,因为这很可能是徒劳的。
DNN 经常发生的情况是,模块在加载时失败,然后皮肤和容器的其他部分也会失败,因为该模块从未完全正确设置。这些是您看到的
NullReferenceException
错误。This is a very generic error. You may want to look through your Event Log to see if there are other errors that occur at the same time more related to your specific module. Debugging the module to see what exception is coming from your module can also be helpful, rather than trying to unwind these stack traces that, more than likely, are going to be wild goose chases.
What often happens with DNN is that a module fails while loading, and then other parts of the skin and container fail because the module was never fully setup correctly. These are the
NullReferenceException
errors that you're seeing.bdukes 说了我猜测的主要内容,无论如何也要记住以下问题。
此问题的另一个原因可能是 dnnwrapper 中使用的特定服务器标记。
例如,如果您使用来自 dotnetnuke 的 Telerik 包装器,但将 Telerik 控件放置在此包装器中,而没有引用 Telerik 组件。
示例:
如果您这样做,您将得到一个空引用。这个问题让我疯狂地寻找它,所以我决定将其发布在这里。
我希望这会对您有所帮助。
但首先我会建议 bdukes 描述的方式(这是正常的方式)。
此致
bdukes said the main things I would guess anyway keep the following problem in mind, too.
another reason for this problem could be a specific servertag used in a dnnwrapper.
for example if you are using telerik wrapper from dotnetnuke but placing telerik controls in this wrappers without having a refference on the telerik assambly.
example:
If you are doing this you will get a nullreference as you got. This Problem drove me crazy to find it so I decided to post it here.
I hope this will help you.
But at first I would suggest the way bdukes described (this is the normal way to go).
best regards