You need to Register for free and Login to post a message in the forum.

Forum

Creating Modules Outside of DNN
Last Post 2008-04-10 01:34 AM by Joseph Craig. 18 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
dnnerUser is Offline
Nuke Pro
Nuke Pro
Posts:67

--
2007-02-20 04:13 PM  

Hi, I'm creating a simple module outside of DNN (In a seperate visual studio solution). However, when I try to access the local resource file I am running into a problem. Essentially, I make a call to the Dotnetnuke.Services.Localization.Localization.GetString method. The problem is that this method then tries to create a PortalSettings object but of course, there isn't one, because this isn't running in a dotnetnuke portal solution at this point.

Because of this the following line

"string mystring = Localization.GetString("NextMonth", "Test/MyModule/App_LocalResources/WebUserControl");"

returns "Object reference does not return an instance of an object".

How can I develop DNN integrated modules outside of a DNN portal solution?

Thanks for your help,

Marcus.

Andy HockUser is Offline
Nuke Pro
Nuke Pro
Posts:90
Avatar

--
2007-02-22 05:37 AM  
Hi Marcus:

When you say 'create DNN integrated modules outside of a DNN portal solution', I'm not sure what this means. Did you download the source code, update the web.config and use the DNN solution? Or did you use the WebApp feature of DNN? Tell us how you got to where you are.

I had the same issues, trying to create DNN modules w/4.x. It's incredibly different than creating modules in VS 2003...and frankly, I don't care for the app_code and app_data solution that Microsoft came up with for Web apps, so what I did is download the source, and opened the DotNetNuke 'solution' file (after updating the sln file to point at my virtual directory and not the default DotNetNuke_2 whatever virtual app).

From there I could add a new project, add a reference to System.Web and DotNetNuke and am building away. But I agree, it's not nearly as easy as it used to be. If you can tell us more, I can try to help.

Also, are you getting this error after installing the module? Or are you debugging inside a virtual directory that has the startup page/project referenced correctly? There's a lot in what you don't say that forces one to assume stuff...especially now that there are so many ways to create a DNN module project. Michael Washington has an excellent set of tutorials on creating DNN modules in DNN 4. I'm sure that Lee does too, though I'm not sure what they are, since I haven't used many of the videos.

You can click on my account and email me directly if you want, though I think it would be good for all to see whatever the eventual solution is for you.

DotNetNuke and .NET web parts, web services, modules and code snippets.
dnnerUser is Offline
Nuke Pro
Nuke Pro
Posts:67

--
2007-02-22 10:25 AM  

Hi Andy,

Thanks for your reply. I'm trying to create a DNN4 module in a completely seperate Visual Studio solution by referencing the relevent DNN dll's.

All is fine until I run it of course. This is because I'm running it outside of my DNN portal application so that when I make a call to a DNN function (in dotnetnuke.dll for example) it returns an error because it tries to create Portal objects. As I'm not inside my DNN Solution there is no current portal so the DNN methods throw an error.

I've created them before inside my DNN portal solution using the starter kit and find it a bit slow and clunky. The really annoying thing is that in order to test and debug my changes I have to fire up the whole application each time which takes ages. I also agree that the APP_Code/APP_DATA architecture is a bit tricky.

It'd be Soooo much easier to develop DNN modules in small lightweight projects that reference the DNN dll's and then integrate them into my DNN Portal solution when they're working.

Thanks for your help.

Marcus.

 

Andy HockUser is Offline
Nuke Pro
Nuke Pro
Posts:90
Avatar

--
2007-02-23 08:17 AM  
Man, you are preaching to the choir here. I too would love to be able to just open up VS 2005, create a new project, actually *see* a 'DNN Module' VS template, point it to the DesktopModules folder, and get started. I mean, that would be the logical way to build stuff right? One would think, but unless one of us learns *why* this procedure isn't working, and until we then create a VS 2005 template that will create a DNN Module Project...well, we're sort of stuck.

I had downloaded the DNN News Feed project (which is not DNN 4 compatible...you have to convert it to DNN 4, though the project *is* in the previous format, while hiding, for some unknown reason, the sources in a renamed .resources file (you have to rename the .resources file to .zip to get the source)), and I then created another 'New Item', which then complained about the presence of the News Feed project references, and the only way to solve that problem was to unload the News Feed project. If the DNN projects aren't compatible with VS 2005, then all hope is lost until someone steps to the fore and realizes that many of us are using VS 2005, and not just the free Visual Web Developer.

I have one question for you. What did you set as the startup url in your project settings? Did you set it to the virtual directory of your site? Or bettwe yet, you are using a 2003 server for development and created a website with an IP address? If not, this could be the cause of your problem (though I know I'm reaching here). I'd be very interested to hear the answer. Perhaps between the two of us we can come up with a way to get around the DNN website/DNN module item paradigm, which is way too complex than it needs to be. I still haven't figured out where the project files are for the 'DNN Module Items'.

Michael Washington, one of the nicest guys on the core team, has some excellent tutorials for using the current paradigm, but like you, I'm really not interested in having to see the entire DNN core when I'm building a module. I'd rather just be able to link to the DotNetNuke.dll, have the project URL point to the DNN virtual directory default.aspx file, have the application point to the core DNN web.config file (this might be part of the problem also--when you create a 'project', by definition, VS 2005 assumes you need a new web.config file, as *each* web or app project requires a web.config or app.config file).

So let me know what your project startup is pointing to. We'll start from there....

DotNetNuke and .NET web parts, web services, modules and code snippets.
Andy HockUser is Offline
Nuke Pro
Nuke Pro
Posts:90
Avatar

--
2007-02-27 09:57 AM  
Hey Marcus:

After spending in inordinate amount of time dealing with the WAP paradigm in DNN 4 and more specifically VS 2005, my solution has been to abandon the whole paradigm. Just trying to find your dlls after you get everything working is a nightmare...and the whole procedure, once you figure it all out shows that it's not a procedure meant for those that want to build modules and offer them to others.

So, back in DNN 3 days, I used a program called DAL Builder Pro 3 to set up new modules. I didn't need to use it, but for 40 dollars, it was worth it to create stubs (and base table design...for simple modules) of code for C# or VB that created actual DLLs, and that you could use 'outside' of dnn.

I hadn't thought Bo Norgaard had updated the program for DNN 4, but I finaly, in my desperation did a google search on it, and found this:

http://www.snowcovered.com/snowcove...ageID=5883

I can't recommend it enough. Not only does it allow you to craete a 'solution' that you can open in VS 2005, but it also creates the class library/data provider dll paradigm that we are using at fingerfuel.com to buid our modules. It even creates a 'web service' folder, though it doesn't actually create a web services project, so you can simply add a web services project to the module solution, then reference the module class library (for the business code) and the data provider dlls, and you basically have a way to create both a normal dnn module, and a dnn module that could potentially call the web service instead of the class libraries.

Hope this helps. You have to get DAL Builder Pro3 and then the DNN 4 plugin, but heck, even if you consider your time worth 5 dollars an hour, it pays for itself in the first project.

I had considered creating my own .vstemplate to create the module project in the same manner as all the dnn 'projects' available for download, but after purchasing the DNN 4 plug in, I no longer thing I need to.

DotNetNuke and .NET web parts, web services, modules and code snippets.
dnnerUser is Offline
Nuke Pro
Nuke Pro
Posts:67

--
2007-02-27 10:29 AM  

Thanks Andy,

This looks really good. The million dollar question is.... "Can you run and debug the module from within the DAL Builder solution"?

For example, if I create a really simple Hello World module (ascx) that has a just a DNN label on it. I then use "Localization.GetString("HelloWorld", "Test/MyModule/App_LocalResources/HelloWorld_UserControl");" which is the DNN function to return the language text from the resource file. Will this work from the DAL Builder solution?

Cheers and thanks for your help on this.

Marcus.

Andy HockUser is Offline
Nuke Pro
Nuke Pro
Posts:90
Avatar

--
2007-03-01 07:01 AM  
Hey:

The DNN 4 plugin for the DAL Builder Pro 3 module will work fine.  All you have to do, once you go through the wizard and create the site, is to open the solution (it will be in the DesktopModules/MyModule/ folder), right click on the 'MyModule' solution, and select 'Convert to Web Application'.  Once you do this, you will be able to debug the app fine.  Of course, you would need to install it on the DNN site, either with a zip of the debug dlls, or via Host->Module Settings->etc.

It's still not the idea solution.  I have tried to contact someone named Vladan who has the beginnings of a 'blank module' solution for DNN 4.  If I don't hear back from him, I am planning on building my own vstemplate, that will allow me to use the architecture I want, since it just isn't available anywhere.

But, at least you can *find* the dlls using the above solution.  Trying to find the dlls using the 'DNN Module' 'item' just doesn't get it done.

DotNetNuke and .NET web parts, web services, modules and code snippets.
Andy HockUser is Offline
Nuke Pro
Nuke Pro
Posts:90
Avatar

--
2007-03-01 04:30 PM  
Hey Marcus:

I would hold off purchasing that DAL Builder plugin as yet. There are some issues with it, that hopefully the person who released the plugin for DNN 4 (Leon something) will address. Until then, I would go with Vladan's 'blank module' solution. The plugin is not quite ready for prime time yet.

DotNetNuke and .NET web parts, web services, modules and code snippets.
David LumleyUser is Offline
Nuke Newbie
Nuke Newbie
Posts:1

--
2007-03-03 04:15 AM  

Go look at the Visual Studio2005 tutorial at http://www.powerhousedata.com

There you will see how a macro is created that allows you to click a button and have a DNN module set up for development. Unfortunatly the Macro only crates a module that only displays a list object maybe it could be updated to allow more custom type modules.

dnnerUser is Offline
Nuke Pro
Nuke Pro
Posts:67

--
2007-03-06 10:51 PM  

Thanks everyone for your responses. I'm now using Vladans blank solution module and am developing modules fairly quickly.

I'm uUsing this with a combination of codesmith dnn templates which also helps to speed things up a bit.

Cheers!!

 

Marcus.

Andy HockUser is Offline
Nuke Pro
Nuke Pro
Posts:90
Avatar

--
2007-03-08 05:32 PM  
Hey Marcus:

Glad to hear you solved the problem.  I also ended up using Vladan's Blank Module to get going, after spending a week debugging the module I purchased--which will eventually be a good product, but has some issues right now.

I wonder, which CodeSmith templates are you using?  Got a link?

Thanks
Andy

DotNetNuke and .NET web parts, web services, modules and code snippets.
wesUser is Offline
Nuke Newbie
Nuke Newbie
Posts:2

--
2008-02-17 03:53 PM  
Are there any new developments as it relates to the VS plug-ins for module development (preferably VS 2008)? I am looking for a dnn module development envronment in c# and any resources related to the topic of dnn module developemnt.

Thanks,
Wes
wesUser is Offline
Nuke Newbie
Nuke Newbie
Posts:2

--
2008-02-17 04:04 PM  
How can I get hold of Vladan's Blank Module? are there any other VS project templates/examples for dnn modules? any c# examples of silverlight modules?

Thanks,
Wes
Joseph CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9001
Avatar

--
2008-02-17 04:10 PM  
I'm not sure that there is a lot of VS2008 stuff specifically available.

For DotNetNuke module development ideas, resources and information, I always check Michael Washington's web site at http://adefwebserver.com. You will also fine some Silverlight information there and, I think, an example module that uses Silverlight.

As for Vladan, google "Vladan's Blank Module" and you'll see lots of references.

Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
sk.rajesUser is Offline
Nuke Newbie
Nuke Newbie
Posts:3

--
2008-04-04 08:31 AM  
 

HI,

I'm having a problem regarding the creation of a new module. I followed according to the Building Websites with VB.NET and DotNetNuke 4 which is to build a coffeeshoplisting module, the creation part was goin well but when it came to the sql there seem to be some error with it, and im not sure how to solve the error eventhough i typed according to what the book has , and some of the vb codes which i typed in which was also from the book has some problem.Is there any simpler way for me to create a module with a database. It's for a school project and i cant seem to get it to work. Urgent!!!

Thxs

Rajeswari

sk.rajesUser is Offline
Nuke Newbie
Nuke Newbie
Posts:3

--
2008-04-04 08:31 AM  
 

HI,

I'm having a problem regarding the creation of a new module. I followed according to the Building Websites with VB.NET and DotNetNuke 4 which is to build a coffeeshoplisting module, the creation part was goin well but when it came to the sql there seem to be some error with it, and im not sure how to solve the error eventhough i typed according to what the book has , and some of the vb codes which i typed in which was also from the book has some problem.Is there any simpler way for me to create a module with a database. It's for a school project and i cant seem to get it to work. Urgent!!!

Thxs

Rajeswari

Joseph CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9001
Avatar

--
2008-04-04 01:17 PM  
Did you also take a look at the websites mentioned in the above thread?

Michael Washington's site, in particular, has some tutorials that show you how to create some simplified modules.

Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
andyb1979User is Offline
Nuke Pro
Nuke Pro
Posts:63

--
2008-04-09 03:00 PM  
I just stumbled on this thread and found it very useful. Im hoping to get into module development soon(ish) and the solution presented here for a module template is very good.

Shame there isnt a C# example, and shame for that matter, that there arn't some module development tutorials on DNN creative!
Sites I made thanks to DNNCreative vids!
Rock Rhyme & Reason Fest | The Big Match | Calvary Stockport | Stephen Webster
Joseph CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9001
Avatar

--
2008-04-10 01:34 AM  
Michael Washington's tutorials are mostly in C#.

His newer tutorials are emphasizing use of LINQ to do the SQL parts.

Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
You are not authorized to post a reply.

Active Forums 4.3

Latest Forum Posts

Admin menu problem by alireza arabiyan
hi i installed dnn 6 on localhost and move it in my host, all link's , pages and modules are ok,
Re: SQL SERVER 2008 R2 Remote connection by Prakasam Srinivasan
I have successfully configured MSSQL Server 2008 r2 remote connection. I am using windows 7 and it h
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config procedure
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config
dnn 4.4 upgrade issue by imran shaikh
hi this is imran i am upgrading dnn 4.4 to dnn 6.0.2 and getting this error please help me for this
RE: How to build Skins for DNN 6.x by Joseph Craig
I'd recommend that you try replacing the hard-coded text with the DotNetNuke Text skin object. That
RE: Module permission does not work! by Joseph Craig
What permissions have you give to that role?
RE: DNN nav issue by Joseph Craig
Are you using a custom skin? How often does this happen?
RE: Friendly URLs Broken by Joseph Craig
I don't entirely understand this, but I'm glad you got things working.
RE: How to build Skins for DNN 6.x by Christopher Adamakis
Dear all, I have one more question regarding greek fonts. If you check my site http://www.expertsoft
RE: Dnn local setup problem by imran shaikh
this is error is resolve now now getting this one Server Error in '/cooperpharma.ma' Applicat
RE: Module permission does not work! by Abraham Tameru
I created a special role for the user to administer the site. The user is not a member of the Admini
Dnn local setup problem by imran shaikh
Hi All i have just installed the new site files on my local computer set the connection strin
RE: Firefox has detected that the server is redirecting the request for this address in a way that will never complete. by imran shaikh
Hi i have the same issue Firefox has detected that the server is redirecting the request for thi
DNN nav issue by imran shaikh
Hi All This is imran i am using DNN 6.0 in which issue is that while i am refreshing the site nav
RE: Problem After Attaching/Detaching Database.mdf by Prakasam Srinivasan
thanks joe! But I have connect with database.mdf file in App_Data. I detach the database from
RE: Ventrian News Article by Collin Stefani
Posted By Joseph Craig on 2012-01-18 10:51 AM I'm not sure that you can with the built-in UI.
RE: Friendly URLs Broken by Vistalogix Corporation
Well, we figured out that the problem is related to .Net framework 3.5. Friendly URLs works fine und
RE: Problem After Attaching/Detaching Database.mdf by Joseph Craig
That behavior of running the installation wizard indicates a problem connecting to the database.
RE: Friendly URLs Broken by Vistalogix Corporation
Nope, just a straight-up DNN install and configured in Host -> Friendly URLs as described in my orig
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds