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 ExtensionsModulesModulesImport/Export Fails Loading ControllerImport/Export Fails Loading Controller
Previous
 
Next
New Post
5/18/2010 8:59 AM
 

I am looking for help overcoming an error.  My module is working perfectly for view and edit using C# MVP (Module/View/Presenter) method into and out of the controller class; however, when I click Export, and enter the Root & filename values it dies on:

AssemblyVersion: 5.4.1
PortalID: 0
PortalName: My Website
UserID: 1
UserName: qhhost
ActiveTabID: 40
ActiveTabName: Home
RawURL: /dotnetnuke/Home/tabid/40/ctl/ExportModule/moduleid/387/Default.aspx
AbsoluteURL: /DotNetNuke/Default.aspx
AbsoluteURLReferrer: http://localhost/dotnetnuke/Home/tabid/40/ctl/ExportModule/moduleid/387/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; iOpus-I-M; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: bd25fc9a-d470-48a3-bccd-bb2dc56eff2e
InnerException: Could not load type 'QHWeb.Modules.EntityType.EntityTypeController'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Compilation.BuildManager.GetType
StackTrace:
Message: System.Web.HttpException: Could not load type 'QHWeb.Modules.EntityType.EntityTypeController'. at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at DotNetNuke.Framework.Reflection.CreateType(String TypeName, String CacheKey, Boolean UseCache, Boolean IgnoreErrors)
Source:
Server Name: Z60M


Again, the controller class works for eveything else, so I am baffelled.  Iportable is [checked] in the module definition. Code is included below.  Any ideas?

using System.Xml;

using System.Collections.Generic;

using System;

using DotNetNuke.Data;

using DotNetNuke.Framework;

using DotNetNuke.Common;

using DotNetNuke.Common.Utilities;

using DotNetNuke.ComponentModel;

using DotNetNuke.Entities.Modules;

using DotNetNuke.Entities.Users;

namespace QHWeb.Modules.EntityType.Controllers

{

public class EntityTypeController : IPortable, IEntityTypeController

.

.

.

public string ExportModule(int ModuleID)

{

 

DotNetNuke.Entities.Modules.ModuleController mc = new DotNetNuke.Entities.Modules.ModuleController();

DotNetNuke.Entities.Modules.ModuleInfo mi = mc.GetModule(ModuleID);

int PortalID = -1;

if (mi != null) {

PortalID = mi.PortalID;

}

//int PortalID = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings.PortalId;

string strXML = "";

List<EntityTypeInfo> colEntityTypes = GetEntityTypes(PortalID);

if (colEntityTypes.Count != 0)

{

strXML += "<EntityTypes>";

foreach (EntityTypeInfo EntityTypeInfo in colEntityTypes)

{

.

.

.

strXML += "</EntityType>";

}

strXML += "</EntityTypes>";

}

return strXML;

}

public void ImportModule(int ModuleID, string content, string version, int userId)

{

DotNetNuke.Entities.Modules.ModuleController mc = new DotNetNuke.Entities.Modules.ModuleController();

DotNetNuke.Entities.Modules.ModuleInfo mi = mc.GetModule(ModuleID);

int PortalID = -1;

if (mi != null)

{

PortalID = mi.PortalID;

}

XmlNode xmlEntityTypes = Globals.GetContent(content, "EntityTypes");

foreach (XmlNode xmlEntityType in xmlEntityTypes.SelectNodes("EntityType"))

{

EntityTypeInfo EntityTypeInfo = new EntityTypeInfo();

EntityTypeInfo.PortalID = PortalID;

.

.

.

AddEntityType(EntityTypeInfo);

}

}

 
New Post
5/22/2010 10:30 AM
 
This appears to be a flaw with MVP. The error is not ocurring in standard code. Could Charles Nurse or someone else responsible for MVP please look into this?
 
New Post
5/30/2010 12:47 PM
 
I really need an answer to this. Let's go about this in a different way. Does ANYONE have ANY working code in C# to do an export? If you choose to answer the question above instead, just look at the code. I have been wracking my brain for weeks, and this load error still persists.
 
New Post
5/30/2010 2:20 PM
 
The problem does not appear to be in your code but rather in your registration (either in the manifest file or the module definition) of the business controller class. When core code tries to instantiate the controller class to perform the export, it is trying to create an instance of the class:

QHWeb.Modules.EntityType.EntityTypeController

however, the namespace + class name is actually:

QHWeb.Modules.EntityType.Controllers.EntityTypeController.

Assuming that the module code is compiled to one assembly named QHWeb.Modules.EntityType, the business controller class should be registered as

QHWeb.Modules.EntityType.Controllers.EntityTypeController, QHWeb.Modules.EntityType

I'm sorry that I missed viewing this thread before now to offer my fix.


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
5/30/2010 3:22 PM
 
Bill, Absolutely currect. That was it. I must admit I do not understand why none of the rest of my modules contains the node Controllers and they work 100%, but those modules are MVC modules. Maybe MVP requires Controllers in the node. Actually. I don't care bcvause it works! Thanks Again, Paul
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesImport/Export Fails Loading ControllerImport/Export Fails Loading Controller


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