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.Load开发者_高级运维Recursive() 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
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 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:
<dnncontrols:datepicker>
<calendar>
<SpecialDays>
<telerik:calendarDays />
</SpecialDays>
</calendar>
</dnncontrols:datepicker>
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
精彩评论