Friday, February 25, 2005
by Nik Kalyani
Friday, February 25, 2005 2:52:41 AM (Pacific Standard Time, UTC-08:00)

A couple of days ago, I blogged about my VS.Net Solution for DotNetNuke that allowed me to work on custom modules without making my solution file bloated with unnecessary DNN project references. After I posted about this in the ASP.Net forums, I got quite a few questions and comments. This led me to investigate further and see if it was possible to create a DNN development environment that would leave the core package untouched, yet allow you to develop your modules without having to worry about file references.

After several iterations, I believe I have a good solution. I have decided to call the solution "My Modules." Here is how it works:

1) The "My Modules.sln" file resides in the root of the DNN folder. It consists of one required project and as many custom module/control projects you wish to add to it.

2) The required project I have named _DNNStub. This is a VB web project that is so named because it will always appear at the top of your list of projects. The only purpose of this project is to have a startup project for the solution. The project has one file -- Default.aspx. This is the standard (unmodified) DNN Default.aspx file. In the file properties within the solution, the compile option is set to "None". This file is included so the solution can have a startup page for debugging.

3) You may now add any of your custom modules projects from DesktopModules to this solution. I prefer to use web projects because I can easily add web-related resources to my project without resorting to tips/tricks. Also, once I load VS.Net, I have it open for days on end so the issue of load-time (which is frequently cited as a reason not to have web projects) is not relevant for me.

4) Whenever you add a custom module project, you must remember to add a reference to this project from the _DNNStub project. This will ensure that whenever you recompile, your compiled assembly will be placed in the root "bin" folder where it belongs. Alternately, you can set your project to build directly to the root "bin" folder. However, this may cause file locking problems and is not something I would recommend you do.

I have packaged everything you need into the Speerio My Modules zip file that is attached to this post. As an added bonus (and to prove that my solution really works), I have also added two custom modules projects -- one C# and one VB.Net to the package. I have also added one webcontrol C# project. Here's the 411 on these:

- Speerio RandomImage Module: This is a C# DNN module project. This module will randomly display one image from a folder of images. As a shortcut to creating a settings page, I coded the module so that it looks for images in a sub-folder based on the title of the module. So if your module's title is "Random Images," it will look in portals/{portal id}/Random Images. The complete source code for this is included and you may do with it what you wish. If you just want to install the PA, use the included zip (in the root).

- Speerio WeatherOutlook: I have setup a Speerio webservices server with some free webservices. One of these is a simple weather service. To illustrate use of webservices in DNN modules, I have included the Speerio WeatherOutlook module. This module will display the 7-day weather outlook for any U.S. zip code (sorry to others). It calls the Speerio Weather webservice at http://speerio.ws/Weather/Weather.asmx. Same as the Random Image module, full source is included, but in VB.Net

- Speerio Stock Quotes control: Another freebie in the package, is the Speerio Stock Quotes control. Written in C#, this calls the Speerio StockQuotes webservice at http://speerio.ws/StockQuotes/StockQuotes.asmx. A test page is included called Test.aspx.

Finally, I have included a script called DNNDebug.aspx in the package. I use this script anytime I see a parser error because it tells me that something is amiss in my ascx file. DNNDebug will let you load any ascx control and will display the exact error message that is preventing it from loading. Within the DNN environment, this message is obscured by the skinning engine and you see a generic parser error. I am confident this script will save you many hours of debugging. It has saved me on countless occasions.

I have tested all of these as best as I can, but it is possible that I have overlooked something. If so, please let me know so I can fix the problem.

Enjoy, and happy DotNetNuking!!!

Speerio My Modules.zip (110.12 KB)
Tuesday, May 03, 2005 11:23:44 AM (Pacific Standard Time, UTC-08:00)
Hi Nik,

thanks for making this VS.NET solution available. In general it works great but I'm having a serious issue with it. The debugger doesn't seem to like the solution very much. I can stop at the desired line just fine but object can't be displayed properly in the watch window. Say I have a statement like:

Dim list As ArrayList = Me.PortalSettings.DesktopTabs

When I break right after that, select 'list' and say 'quickwatch' I can't view the individual items of the list. If an object shows up in the 'autos' watch list it will have a little '+' to the left of it but when I click on it, nothing happens except the '+' disappears. If I explicitly watch the member I care about (me.UserID for example) I get the correct value.

When I use the stock DNN solution with all projects except buildsupport and my own deselected from the build process the debugger works fine.

Is there something I have overlooked? Feel free to contact me by email (sander at squadengine d com ) to discuss. My ASP.NET forums handle is 'Nocturnal'. If you'd prefer to discuss it there that's fine too.

Thanks!
Friday, May 06, 2005 6:08:33 AM (Pacific Standard Time, UTC-08:00)
Hello,

I'm absolutely new at .NetNuke, so forgive me if this is something dumb. After doing a fresh install of .NetNuke (and being able to access it in the browser at http://localhost/DotNetNuke), I copy the files over from My Modules as instructed in the install.txt.

When I hit reload on the browser, I get the following server error:

Server Error in '/DotNetNuke' Application.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Line 196: <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 197: <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 198: <add assembly="*"/>
Line 199: </assemblies>
Line 200: </compilation>

Source File: c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198

Any ideas?
Rick
Tuesday, July 12, 2005 12:17:53 AM (Pacific Standard Time, UTC-08:00)
I must admit to being more impressed for it. I've even recommended it to all my friends.
Tuesday, July 12, 2005 9:48:32 PM (Pacific Standard Time, UTC-08:00)
I have been using it. Outlook Express more stable and secure than other programs.
Thursday, October 20, 2005 9:24:02 AM (Pacific Standard Time, UTC-08:00)
I can't seem to find the source here or on Speerio.net (even after I've logged in).

Where can I acquire the source?
Thanks!
Saturday, November 12, 2005 12:05:08 PM (Pacific Standard Time, UTC-08:00)
I am a great fan of your Mymodules solution I was wondering if you were planning to do it for DNN4 release.
I have tried to replicate what you have done, but no success could you give me a idea of how i am supposed to do it?

Thanks in advance
Wesley Fraser
Wesley Fraser
Sunday, November 13, 2005 11:05:22 PM (Pacific Standard Time, UTC-08:00)
If two friends ask you to judge a dispute, don't accept, because you will lose one friend on the other hand, if two strangers come with the same request, accept because you will gain one friend.
blackjack
Sunday, November 13, 2005 11:55:05 PM (Pacific Standard Time, UTC-08:00)
Don't be dismayed at good-byes. A farewell is necessary before you can meet again. And meeting again, after moments or lifetimes is certain for those who are friends.
Monday, May 15, 2006 2:43:06 PM (Pacific Standard Time, UTC-08:00)
Do you have a DNN 4 version of this in the works?
Wednesday, March 21, 2007 7:35:26 AM (Pacific Standard Time, UTC-08:00)
http://hohosearch.com/0023/005.html sory test
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, i, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
RSS feed
Search and Links
Bling

View Nik Kalyani's profile on LinkedIn

Contact me: nik*kalyani.com (replace "*")

TechBubble
www.flickr.com
This is a Flickr badge showing public photos from techbubble. Make your own badge here.
Statistics
Total Posts: 216
This Year: 34
This Month: 2
This Week: 0
Comments: 238
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Nik Kalyani
Sign In
All Content © 2008, Nik Kalyani