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...How to import/create custom modules? How to import/create custom modules?
Previous
 
Next
New Post
3/8/2011 6:05 PM
 
environment: VS2010 Pro / vb.net | DNN 5.06
Issue: How to take existing ascx/ascx.vb applications and wrap them into DNN

I have tried this both way and both fail.
So i unpacked DNN5.06 from codeplex and made a copy into my c:\projects dir. Open the folder in VS2010 and compile. Run through the setups.. its all good. Now its time to make this thing do something.
  • Close the DNN Project
  • Open my UsersAndRoles Project located at c;\Projects\UsersandRoles
  • Create a new user control (Users.ascx) - Very basic control. datalist and checkbox list. on_load fill the datalist with aspnet membership users. set checkboxlist datasrource to roles.getallroles ... logic is take selected user in datalist and return selected roles.. VERY basic. also 100% aspnet membership stuff.

Now... how do I get it in DNN? Open and run DNN , try to create a module... nope. try to add extension ... nope. Okay so maybe I have to do it from code behind.
Open DNN in VS2010.. DesktopModule > Admin > Create Folder (TESTING) > create NEW User Control (MyTest.ascx) copy/paste existing code/html from Users.ascx.. compile... site compiles.

HOST > Module Definitions>Create Module > find the ascx ... create page.
error
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() --- End of inner exception stack trace ---


so can someone tell me how to
A: import/work on modules outside the actual application and later import them via the front end? (accessing back end will not be possible later).
B: compile module from other projects for use within DNN that have either same connection strings or are leveraging existing aspnet membership classes.

thanks.
mac

 
New Post
3/9/2011 4:24 AM
 
This site amongst others have some good guides to developing dnn modules.

http://adefwebserver.com/dotNetNukeHELP/

westa
 
New Post
3/9/2011 10:38 AM
 
I will keep looking around as the provided link does not answer how to work with existing code on other projects. I must be missing something basic in that I don't understand why I need to have the entire framework running on my machine all the time when I plan on 'zipping' the module and installing it using the front end tools.
mac
 
New Post
3/9/2011 3:58 PM
 
The reason for posting the adef web site link - is that that the listings there explain in pretty good detail the methodology behind building a DNN module.

They provide a fundamental level of understand of what is required to create a module, integrate said module with the dnn api, and then install that module into the dnn ecosystem.

If you do NOT understand why you need the framework running on your machine, then it is obvious that you have not read thru and followed the guides on the adef website - since if you had, you would already have a much better understanding of how dnn works - and WHY you need the framework.

But for starters - to give you a leg up -  EVERY module that is capable of being integrated into DNN must be coded as an ascx class inherited from dotnetnuke.Entities.Modules.PortalModuleBase or a child of that class.

This class provides all the minimum functionality to allow your code to interact with and participate in the DNN lifecycle.  It exposes access to core api functionality such as portalsettings and the entities system, and provides the base structure for the Iportable, Isearchable and Iactionable implementations amongst a host of other things.

DNN is a content platform and as such if you want to code for that content platform you have to follow its guidelines ... you CANT just 'zip' up a chunk of code and think that DNN will work out the rest - it just dont work like that ... 

So if you DO want to understand how DNN works - follow the guides and make a couple of modules based on the steps in the adef website or other places that you may find dnn module guides -- they will all say the same thing --- for starters to make a dnn module - you must install the framework.

Westa
 
New Post
3/9/2011 4:07 PM
 
One other comment ... I'm wondering what you are trying to achieve by stuffing around with the aspnet membership and roles system.  DNN has a native provider model that encapsulates and extends the generic aspnet membership and roles system beyond the core.

If you are trying to manipulate the aspnet membership and roles in an attempt to manage the users and roles in dnn - then you are going down the wrong path - you should be using the built in DNN api to manage users and roles inside DNN as it provides a much deeper provider based model.

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...How to import/create custom modules? How to import/create custom modules?


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