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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...New DotNetNuke Module Development - error when try to place control on pageNew DotNetNuke Module Development - error when try to place control on page
Previous
 
Next
New Post
2/12/2011 12:34 PM
 
I have worked my way thru setting up a development environment as suggested in the Basic DotNetNuke Module Development tutorial using the VB version of the sample template. I named the module UserDisplay and I set up the domain as dnndev as in the tutorial. I got all the way thru all of the steps including installing the module inside of DNN successfully. I made no changes to the module at all.  When I try to place the control on a new test page I get the following message:

 

UserDisplay

Error: UserDisplay is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Could not load type 'XYZ.Modules.UserDisplay.View'. ---> System.Web.HttpParseException: Could not load type 'XYZ.Modules.UserDisplay.View'. ---> System.Web.HttpParseException: Could not load type 'XYZ.Modules.UserDisplay.View'. ---> System.Web.HttpException: Could not load type 'XYZ.Modules.UserDisplay.View'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throw ) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---


  

 

 
If I try to access the setting for the module I get a second error message:

Error A critical error has occurred.
Object reference not set to an instance of an object.
 
Any idea of where I messed up?

At a Loss.

 
New Post
2/13/2011 10:34 AM
 
I figured out what the problem was.  I was using the VB version of the module and Visual Web Developer 2010 Express. On a previous installation I had used the Starter Kit and the instructions for the Starter Kit indicate that on the Application tab for the project that you are to clear the root namespace when working with a VB module.  When setting up this new template I assumed that this was also the case and failed to read the instructions on the documentation screen carefully.  I went back this morning and changed the root namespace according to the documentation and the control is now loading without error.  Perhaps this information will help someone else that is equally confused by conflicting instructions associated with setting up VB modules.  I would be curious to know when the root namespace is to be left blank for VB modules and when it is to be used.  If anyone knows what setting inside the template effects this I would appreciate understanding this better.

A Little Knowledge is a Dangerous Thing
 
New Post
2/13/2011 7:26 PM
 
Hi there,
As far as I know if you code with VB.Net, you have to remove the root namespace to empty on your development project.
While in C# you have to enter this root namespace name.
 
New Post
2/14/2011 10:51 AM
 
That's what I thought too.  However, if you use the VB template that Chris Hammond has created and referenced in his blog - http://www.dotnetnuke.com/Resources/Blogs/tabid/825/EntryId/2632/Using-and-Customizing-a-C-Module-Development-Template.aspx - and you look at the instructions in the documentation.html file that comes with it, you are told that there are two settings for the project that need to be made on the Application tab:

On the Application tab:
  • Make sure the Assembly name textbox is set to "PilotInterface".
  • Make sure the Default namespace is set to "XYZ.Modules.PilotInterface".
There is no field marked a 'Default namespace' in the form for the Application Tab - at least not in Visual Web Develper 2010 - only the one marked as 'root namespace'.  However when the root namespace was blank and I added the module to a page I got an error.  When I filled in the 'root namespace' with the information indicated by the instructions for the 'default namespace' the control worked.

That's what has me confused.  It seems to me that something must be different between the Starter Kit VB module template and Chris's VB module template.  BTW the template that Chris has set up is VERY easy to work with and the environment that he has outlined makes development VERY easy to work with as well.  I'd just like to understand why the one works with the root namespace blank and the other works with the namespace filled in.

Confused
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...New DotNetNuke Module Development - error when try to place control on pageNew DotNetNuke Module Development - error when try to place control on page


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