Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesModule Load Exception - ModuleHost.vbModule Load Exception - ModuleHost.vb
Previous
 
Next
New Post
1/19/2011 12:46 AM
 
Building a custom module. I have had success with this module in the recent past installing it and running it in DNN, but after I made a few changes, I am getting this error upon trying to run the page that has it installed. Since this is a load exception, does that mean that it is more of a module definition issue or .dnn manifest issue (where not all the files are copied?) as opposed to an issue with the module code itself? Is the only way to debug this is by running under the Source version of DNN? I am currently building the module within the Desktop Modules folder in an Install version of DNN 5.5 and can debug my module itself, but it never gets to the page load event...which I'd expect given it is a module load issue. Any pointers for this error:

ModuleId: 1150
ModuleDefId: 300
FriendlyName: The Dyno Room
ModuleControlSource: DesktopModules/Incite/The Dyno Room/TheDynoRoom.ascx
AssemblyVersion: 5.5.1
PortalID: 0
PortalName: TheDynoRoom.com
UserID: 29
UserName: chad1
ActiveTabID: 453
ActiveTabName: Test Module 2
RawURL: /TestModule2.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://dnn_dev/
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.47 Safari/534.13
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 0c02c8f7-56d4-43e0-9396-494eb7d68a59
InnerException: Object reference not set to an instance of an object.
FileName: C:\CCNet_Builds\CE_Development\WorkingDirectory\Library\UI\Modules\ModuleHost.vb
FileLineNumber: 243
FileColumnNumber: 17
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() in C:\CCNet_Builds\CE_Development\WorkingDirectory\Library\UI\Modules\ModuleHost.vb:line 243 --- End of inner exception stack trace ---
Source
Server Name: CRICHARDSONV
 
New Post
1/19/2011 8:48 AM
 
I would first confirm that your module control (TheDynoRoom.ascx) inherits from DotNetNuke.Entities.Modules.PortalModuleBase which implements IModuleControl. In looking at the source code for ModuleHost.vb, my guess is that the null reference error is occuring when the code trys to cast your module control to IModuleControl and is unsuccessful.

If that is not the issue then I would look at the registration information for that control (Host-->Extensions then click on edit pencil beside the entry for your module) to see if all appears to be correct.

Sometimes is is necessary to debug into the source code of DNN to find the point of failure if it is outside of your own extension's code. That is one of the reasons that I set up source install of the same DNN version I'm developing against and keep it open in another instance of Visual Studio. It is also helpfuly to be able to look at the source code of  DNN API methods  to determine exactly what parameters are to be passed to them.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/19/2011 11:56 AM
 
Thanks William! It was not inheriting from portalmodulebase as you suspected. I added a new control that would then dynamically load a master or a detail control and in that one I forgot to inherit from portalmodulebase. Thanks again! Chad
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesModule Load Exception - ModuleHost.vbModule Load Exception - ModuleHost.vb


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out