My code does the following
DotNetNuke.Entities.Modules.ModuleController moduleController = new DotNetNuke.Entities.Modules.ModuleController();
if (moduleController != null) {
var requestedModule = moduleController.GetModule(moduleid);
...
}
I get a nullreferenceexception on the line inside the if even though the moduleController is not null, so I'm assuming it has something to do with the internals of the GetModule method. Any help would be much appreciated.
Thanks.