DotNetNuke Hosting with

BLOG about DotNetNuke CMS, latest technology and Special DotNetNuke Hosting Package with

DotNetNuke 7.3 Hosting with :: Developing a Webservice in DotNetNuke 7.3

clock November 21, 2014 05:30 by author Ben

I have recently been assigned to built a DotNetNuke web service to permit a windows application (or any sort of net client for instance) the flexibility to control DotNetNuke person accounts (create, change roles, delete, retrieve e mail address, and so forth.).


Since I had a tough time locating an accurate code sample or documentation that really applies to DotNetNuke 7.3 and accessing it without having being earlier logged in to DotNetNuke, it absolutely was difficult to constructed anything at all. I ultimately found out how to do it properly so I hard I would put my attempts to some use and write a blog publish explaining how you can get it done step by stage.

That said, let's begin by the fundamentals and just create a publicly available web services that permits anybody to ping the net service and acquire a pong again. For that we are going to use the new DotNetNuke 7 Providers Framework which makes it fairly simple should you know how to utilize it.

In order to create a net support that will work within DotNetNuke 7, you will need to fireplace up Visual Studio and create a class Library project (c# or VB but all illustrations listed here will be in c#).

That done, we will then reference some needed DotNetNuke 7 required libraries (making use of the Add Reference dialog box), here's the list:


Then we also need to reference the System.Web class from the .NET tab of the same dialog box.

Finally, we neet to set the output path of the project to the DotNetNuke bin directory and we are ready to code.

Here is the code, the explanations follow:

using System.Net;
using System.Net.Http;
using System.Web.Http;
using DotNetNuke.Web.Api;
namespace MyService
    public class PingController : DnnApiController
        public HttpResponseMessage PublicPing()
            return Request.CreateResponse(HttpStatusCode.OK, "Pong!");
    public class RouteMapper : IServiceRouteMapper
        public void RegisterRoutes(IMapRoute mapRouteManager)
            mapRouteManager.MapHttpRoute("MyService", "default", "{controller}/{action}", new[]{"MyService"});

  1. We merely start with some using statements for our needs as demonstrated previously mentioned
  2. We develop a namespace for our service and no matter what name we use listed here will be part of the url. I utilized MyService just for this instance but use any name which makes perception for your services.
  3. Now we create a public class for our controller. You'll be able to create numerous controllers if you want to and the controller is just a bunch of related actions that make feeling to group with each other. In my genuine project I have a PingController for testing functions, a UsersController for almost any steps that relate to user accounts and so forth. Just utilize a identify that makes feeling because it will even present up in the url. Two things for being careful right here:

    • The identify of one's controller should end using the term Controller but only what will come just before it will show inside the url, so for PingController, only Ping will show in the url route.
    • It should inherit DnnApiController so it'll use the DotNetNuke Providers Framework.
  4. Then we create the actual motion, inside our case, PublicPing. It's just a straightforward technique which return an HttpResponseMessage and may have a handful of characteristics. By default the brand new providers framework will respond only to host consumers and you also must explicitly enable other access rights if necessary, in this case the [AllowAnonymous] helps make this technique (or action if you prefer) obtainable to anyone with out credentials. The next attribute, [HttpGet] can make this action reply to HTTP GET verb, which can be usually used when requesting some date in the web server.
  5. Finally in that action, you insert whatever code you action needs to do, in this case just return the string "Pong!", just remember that you should return an HttpResponseMessage rather than a string or int or other item.

Ok so our controller and motion is done, now we just need to map that to an actual URL and that exactly what the final portion of the earlier code does. In essence this code tells DotNetNuke to map a specific url pattern for the techniques outlined in your course. You can use that code as is simply replacing MyService by no matter what your support title is.

That is all there is certainly to it, your services is prepared! To test it, first compile it, then just navigate to http://yourdomain/DesktopModules/MyService/API/Ping/PublicPing and you should see "Pong!" inside your browser like a response.

Passing parameters

Ok, so the basic code above is working but it doesn't do anything useful. Lets add something more useful by creating an action that will give us the email address for a specific user id.

Again, here's the code and the explanations will follow (place the code inside the same namespace as the previous one):

public class UsersController : DnnApiController
        public HttpResponseMessage GetEmail(int userid)
            DotNetNuke.Entities.Users.UserInfo ui;
            ui = DotNetNuke.Entities.Users.UserController.GetUserById(PortalSettings.PortalId, userid);
            return Request.CreateResponse(HttpStatusCode.OK, ui.Email);

Initial we build a UsersController course which will hold all actions related to person accounts, it isn't completely required, you'll be able to have numerous steps within the same controller, nonetheless because this motion is not in any respect connected to our PingController, let'a create a new one more descriptive.

We then create a GetEmail motion (method) which will accept a userid parameter. The [RequireHost] parameter listed here will make it accessible only to host customers, we are going to see afterwards other authentication options.

The code inside the approach alone is fairly significantly self explanatory. The only interesting factor to notice listed here is the fact that because our course inherits DnnApiController, we already have a PortalSettings item obtainable. That is the big benefit of producing use of the DotNetNuke Solutions Framework. You'll have a ModuleInfo object to represent your module (if there is 1 using the identical identify as your support, which can be not essential such on this scenario), a PortalSettings object that signifies the portal at the domain title utilized to accessibility the support (portal alias) and at last a UserInfo item symbolizing the person that accessed the web services.

If we now navigate to http://yourdomain/MyService/API/Users/GetEmail?userid=2 you need to receive the email tackle back again from the server unless of course obviously that userid does not exist, ensure that you check having a userid that truly exists for that portal. Should you exactly where not formerly linked having a host account, you then will probably be requested for qualifications.

Limiting access to particular roles

Alright, that actually works however, you need to give host qualifications to anyone needing to make use of your webservice. To avoid which you can change [RequireHost] by [DnnAuthorize(StaticRoles="Administrators")] which can limit access to administrators. Much better however, you nevertheless must provide them with an admin account. So the easy method to give only constrained entry would be to create a brand new role in DotNetNuke only for your internet services and substitute Administrators by that specific function title within the authentication parameter.

Utilizing HttpPost : (reply to a comment down bellow)

To answer Massod comment bellow, it's nearly exactly the same thing however, you have to develop an object to contain the posted information.

Let's make a easy ping that makes use of Submit, very first we need to create an object which will contain the posted info this sort of as:

public class FormMessage
        public string Message { get; set; }

Then we create the service method something like this:

public class PingController : DnnApiController
       public HttpResponseMessage PostPing(FormMessage formMessage)
           return Request.CreateResponse(HttpStatusCode.OK, "Pong from POST: message was '" + formMessage.Message + "'.");

note that normally, a post would only return ok and no message, I am just doing this so we can test here.

Now since this is a POST verb, we can't test it by only using url parameters, we need to make an html file with a form to test it out. It would be someting like this:">
<html xmlns="" >
    <title>Untitled Pagetitle>
    <form action="http://dnndev/DesktopModules/MyService/API/Ping/PostPing" method="POST">
        <label for="message">Message: label><input type="text" name="Message"/>
        <input type="submit" value="Submit"/>

The crucial thing to not right here is you can not just develop your Publish technique taking a string even when this can be only what you require, you do must create an object which will get your parameters.

Also never overlook that this is only for tests, you usually do not need to make this publicly accessible, you'd probably usually use yet another parameter than [AllowAnonymous] such as [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] and [ValidateAntiForgeryToken] unless you truly want that for being public.


DotNetNuke 7.3 Hosting with :: Allow Non-Admins to do Web Page Management

clock November 19, 2014 07:14 by author Ben

In DotNetNuke 7.3 the artificial distinctions between Normal and Admin webpages was taken out. All Modules confirmed inside the Admin-Menu can now even be placed on any custom webpage and fundamentally everyone could use them. This informative article gives you directions how you can permit Non-Admins to access the DNN Web page Management and workaround some restrictions.


Erik Van Ballegoij presently wrote regarding how to offer non admins accessibility to any admin web page. You can just insert the module like any other into a preferred Page. It’s important to give the desired user(s) Edit Permission on that Web page (not only on that module) otherwise they get an “Access Denied” warning.

Essentially which is it. Users can now edit Page options for Web pages they have edit Permissions to but for no other Pages. There are just two limitations:

  1. Drag and fall to reorder Pages only functions for Directors
  2. Incorporate Webpage(s) only operates for Directors

To get these functionality to operate for Non-Administrators adapt the file at ~/DesktopModules/Admin/Tabs/Tabs.ascx.cs. You’d need to comment out a Safety examine PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) three times:\

  1. OnInit: remark out the if-Condition (line ~237) and the else statement (~243-247)
  2. CtlPagesNodeDrop: comment out the if-Condition (very first line)
  3. OnCreatePagesClick: remark out the if-Statement (first two strains)

Which is it. I examined it effectively on DNN 7.3.3.



DotNetNUke 7.3 Hosting with :: TIPS Getting rid of spam users

clock November 18, 2014 06:14 by author Mark

Quick tips : Getting rid of spam users

After getting a couple of questions, I'd like to provide options for getting rid of spam users, which is cumbersome via UI, if thousands of registration have been added by a bot.
Unfortunately, it is not as easy as just deleting items from a single table, as user Information is distributed in multiple tables inside the database, therefore we need.
You are in a comfortable situation, if your site is using verified or private registration - in this case all spam users are unauthorized and you simply need to hit "delete unauthorized users" in Admin > User Accounts.
In all other cases, you will need to identify the users to delete from the database and mark as "deleted", in order to use "remove deleted users" (hard-delete) those users from all tables.


If your site only has a host and admin user you would run the following statement inside Host > SQL (check "run as script" in all DNN versions prior to 7.3):
UPDATE {databaseOwner}[{objectQualifier}UserPortals]
 SET   isDeleted = 1
 WHERE UserID NOT IN (SELECT UserID FROM  {databaseOwner}[{objectQualifier}Users
                                    WHERE isSuperuser = 1 OR UserName Like 'Admin')
If you may identify all users by registration date, e.g. since first of November, you would run
UPDATE {databaseOwner}[{objectQualifier}UserPortals]
 SET   isDeleted = 1
 WHERE UserID NOT IN (SELECT UserID FROM  {databaseOwner}[{objectQualifier}Users]
                                    WHERE isSuperuser = 1 OR UserName Like 'Admin' or CreatedOnDate < 2014-18-11)

Of course, this will become more difficult, if regular users registered the same time. You may consider creating a role "verifiedUsers" and move all regular users manually into this group. Now the command would look like

UPDATE {databaseOwner}[{objectQualifier}UserPortals]
 SET   isDeleted = 1
 WHERE UserID NOT IN (SELECT UserID FROM  {databaseOwner}[{objectQualifier}Users]
                                    WHERE isSuperuser = 1 OR UserName Like 'Admin' or CreatedOnDate < 2014-18-11)
   AND UserID NOT IN (SELECT UserID FROM {databaseOwner}[{objectQualifier}vw_UserRoles]
                                    WHERE RoleName Like 'verifiedUsers')

Afterwards you may use "Remove Deleted Users" link in Admin > User Management, to delete all rows.
For DNN Versions prior to DNN 7.3.1, you need to delete user folders manually, which reside nested inside users subfolder of the portal folder. Unfortunately, it is difficult to identify all folders from deleted users, but you may delete all empty folders without subfolder and files inside, as the folder for a still existing user will be re-created, once the user logs in again for the first time. You may use the following command (sing a command line on the server, while being inside the users folder)
for /f "delims=" %i in ('dir /ad /s /b') do @rd "%i"
Finally, you should enter file manager in DNN Admin menu and perform a recursive sync to get rid of all folder entries and folder permissions in the database

DotNetNuke 7.3 Hosting with :: Released DNN 7.3.4

clock November 14, 2014 08:03 by author Mark

I am pleased to announce that DNN Platform 7.3.4 has been released. The 7.3.4 release is a stabilization release. DNN 7.3.4 is a smaller maintenance release than normal and is focused on addressing the most serious platform issues. It is expected that this will be the final platform release prior to DNN 7.4.0 which is expected to be released in January 2015. Once again the community has provided a number of significant fixes for this release. I look forward to increasing this level of participation coming in future releases.
You can find all of the issues resolved in this release in our issue tracker. Download 7.3.4 from the DotNetNuke Downloads page.

Major Highlights

  • Fixed issue where site settings were not updating correctly in multi-language installations
  • Fixed issue where partial site templates were not working correctly with child sites
  • Fixed issue where links created in Telerik RadEditor were not correct
  • Fixed issue where search results might be duplicated
  • Fixed issue where user could not change default value for a profile property
  • Fixed issue where a file uploaded from the web is not visible in the Host File Management
  • Fixed issue where ControlBarController returned invalid JSON
  • Fixed issue where you couldn't add a module in a spanish language site
  • Fixed issue where a clustered index was missing from a search table
  • Fixed issue where uploading an ICO file failed
  • Fixed issue where HTML Editor Permissions were not working correctly
  • Fixed issue where popups were not centered on the screen
  • Fixed issue where popup iframe is not initialized correctly
  • Fixed issue where AUM was not correctly handling 301 redirects
  • Fixed issue where multiple region/country controls in a profile did not work correctly
  • Added ability to save localized lists to resource file
  • Added method to remove all subscriptions from a ContentItem

Security Issues

  • None

DotNetNuke 7.3 Hosting with :: DNN Spam Registrations

clock November 11, 2014 08:14 by author Mark


Recently there has been a lot of discussion in the community around DNN Spam registrations and methods and processes to prevent or fix the issues that are associated with them.  I've been debating on if/when I should actually write about this given that there is an Official DNN Software response on the issue, as well as many other community comments.  Well, when I had a server go down and guess what it was because of this very issue so I think its time to give my quick perspective and recommended action points for those of you that are running a DNN site.  These recommendations apply for ALL DNN versions!

Update Registration Mode Setting

If possible, set your registration mode to "none" if you don't need public registration.  This is a great first defense.  If this isn't possible, then go with the next best step and that is to create a custom registration page.  If you do this, though make sure that you follow the instructions in the next step.

Optional: Add IIS Request Filtering

One of the recommended "stop gap" items that DNN Corporation recommends for those that cannot set registration to "none" is to set a filter in IIS for request filtering.  I STRONGLY recommend this solution and am rolling this out to ALL DNN sites that I manage or have any control over that need to allow user registration.  This will prevent the most basic backdoor used by these scripters which should at least help limit things a bit.

Post Change Investigation & Resolution

This is the key, the above changes are quick & easy, but it is the investigation that is key.  I'm writing this post because of the investigation and resolution that I had to do tonight while on vacation.  I had a server that went down, with a clients database that grew from 45mb to almost 1gb in 7 days, had a user count grow from 2 users to 197,000 users in that same 7 day period.  All of this happened silently, without stressing server resources, without setting off any DDOS alerts or anything.  How did it become an issue today?  The site owner tried to make a change and then it fell on its face.

So, given that this can be a silent threat to your site, what do you need to look for, and what actions can you take to fix?  Lets look at these next.

Do you have impacted Users?

If you are lucky, your site will not have any impacted users and you can stop here.  However, if you go to "Admin" -> "User Accounts" and see that you have 50,000 users when you should only have 10 you have some work to do.  This is the fastest way to look at things and identify what is going on.  If you have rogue users you will need to do two things to truly 'clean' your installation from these user accounts.

Delete the User Accounts

The first step in resolution is to get rid of the users that are impacting the site.  How you accomplish this is going to vary a bit.  If you have 5, 10, 20 SPAM users, just manually use the DNN delete features, but make sure to note the User Id value for each user.  If you have a lot of users, for example in my case more than 100K users to remove, you are going to want to investigate a scripting solution.

I will not post direct SQL here as you NEED to be a user with proper SQL knowledge to do this, but you can do this VERY fast and very clean within DNN.  Simply set all of the users that you need to remove to "Deleted" in the database, then use the "Remove Deleted Users."  Now, this process of having DNN remove the users might need to be repeated as there is a 30 second timeout on DNN database queries.  In my case it took 10 attempts to remove all.

Delete the Folders & Re-Sync Files/Folders

This is one area that is not often remembered by administrators with fake accounts.  Each user that is created in more current versions of DNN have a folder created for them inside of the users folder within DNN.  You will want ot go in and delete all of these folders from the filesystem.  Then once that is completed you will want to go to "Admin" -> "File Manager" and sync the filesystem.  This is imperative as more entries in the folders and permissions table will slow down areas of the site that interact with these tables.


We need to see what the final fix is for this issue, but in the meantime we need to be vigilant and keep our own sites as protected as possible.  Given the nature of this issue I am being a bit vague in recommendations as the exact solution isn't going to be the same for all users and sites.



DotNetNuke 7.3 Hosting with :: New Google Maps Integration with DotNetNuke 7.3

clock November 11, 2014 05:23 by author Ben

Now you'll be able to add Google maps to posts. Post might have the primary post map, and with tokens you'll be able to include a limiteless quantity of maps to content articles. Maps may be very easily created and edited by way of the in-built Map editor.

Within this blog I'll clarify How you can insert new google maps into DotNetNuke 7.3. Google has up-to-date Google maps to new UI and features.

So will start with Google maps very first.

Click the Google applications on right top facet of one's browser. Open up Google maps appplication.

You will be landed to New Google maps. Type your address or location in the search box. For instance i have added Madame Tussaud Newyork.

Once your location is targeted on google maps.Click on setting at the right bottom side of the map and select share and embed maps.

A modal popup will look on the display with Share hyperlink and Embed map alternative. By this you are able to possess the link in the map to provide to any hyperlinks if required else we can select to embed the map into your site or application. Also you'll be able to shorten the URL if necessary .

Given that we need to embed google maps into DNN we are going to choose Embed maps alternative. After you click on embed maps option you'll have a smaller sized see of maps you've selected i.e in my scenario Madame Tussauds The big apple with ratings, reviews, bigger map choice and obtain directions. You can even bookmark if necessary.

OK once you have got map on Embed maps. Now you can choose the size of the map required based on your requirement. Google offers small, medium, large and custom size.

We can change the size of the maps by using custom size.Google maps also provides option to preview your custom size by clicking on preview option.A new window will be popped out for preview.

For now we will be using Medium as our map size. Will select medium size and copy the iframe provided.

Once iframe is copied will now login to our DNN (DotnetNuke). Add username and password and login to DNN.

Once DNN is logged in. To place our Google maps on our site we need to add a HTML module to our site. This can be added  by navigating to Modules > Add New Module > Selecting Common from the Drop down.

Once common option is selected from drop down options will be narrowed to HTML. Drag the HTML module to your selected pane in my case i am adding module to Content Panel.

Now we have added HTML module to our Content panel. We need to edit content inside our HTML module. This can be completed by clicking on pencil icon existing on the HTML module. In the event you dont have pencil icon navigate to Edit page choice on proper leading corner in the DNN control panel. After pencil icon is clicked click on on edit content.

Once you select Edit Content. A modal popup will appear with all editing option. Initally the editr will be in Design mode change the mode to HTML. This can done just by clicking on HTML option just below the editor.

Once you selected HTML mode. Paste the iframe we copied from Google maps to the HTML editor in DNN. After pasting the iframe to DNN editor save the module by clicking on save button.

Thats it Google maps will be embeded on your DNN page in a following way.

Hope you liked my tutorial.


DotNetNuke 7.3 Hosting with :: How Using WebMatrix to build a DotNetNuke Application

clock November 7, 2014 10:56 by author Mark

DotNetNuke is a widely adopted open source platform for building web sites and web applications with a Content Management System build on .NET. WebMatrix is a free tool that allows you to create, customize, and publish webpages. It gives a number of different ways that you can create websites. One of the features is providing existing open sources applications such as DotNetNuke, as well as WordPress, Joomla, DotNetNuke or Umbraco. In this tutorial, you will see how quick and easy it is to get your DotNetNuke application up and running! And show how to install, configure and publish a DotNetNuke application with WebMatrix.
If you do not already have WebMatrix, it can be downloaded for free at
When you launch WebMatrix you will see several options on how to create a new application. To create a DotNetNuke application, select “App Gallery.”

We will now choose the “DotNetNuke Community Edition” icon to install the application. You can give your application a name or keep the default name.

You will be prompted to select a database. Select “SQL Server” and make sure the “Windows Integrated Authentication” radio button is selected and click Next.

You will be prompted to install DotNetNuke. To do this you must click the “I Accept” button.

Now we wait while DotNetNuke is installed. This make take up to a couple minutes.

Once the installation is complete we will get a confirmation.

Clicking the “OK” button will take us to our WebMatrix workspace with the DotNetNuke application loaded.

To configure our DotNetNuke application, we will use the Installation Wizard. To run our installation wizard, click the “Run” button on the Menu Ribbon. Note: make sure you run the root folder of the application. Running our application will open the DotNetNuke Installation Wizard. Here we will have three different options for installation: custom, typical and auto. For this article, we will use the typical installation.

To successfully install our DotNetNuke application, we must first pass a permissions check. The installation wizard will notify you if you passed the check or not.

After we pass the permissions check, we must enter our database information. In this example we’ll use a SQL Server 2005/2008 (Express) File.

Once the database connection is created, the installation wizard will install the database for you. The installation of the database can take quite a few minutes.

Once the database installation is complete, a confirmation message will appear at the bottom of the window. The “next” button will once again be enabled. We must click “next” in order to continue with the installation wizard.

We now will have to create a Host account. Fill in the form and hit the “next” button. It is a good idea to write this information down.

Once your installation is complete you will be able to access your portal and log in.

In order to customize our application, we now need to login to our site as an admin. You should have been automatically logged in when your site was created. Once you are logged in as an admin you will have access to more features that allow you to customize your page. A tool bar will be present at the top of the screen.
We can add a new page to our site by adding the required information of name, what template, and where to insert the page to our application.
Mouse over the Pages link at the top and click the “Add” link which will show us a form where we can fill out information about our page.

After filling out the information, select “Add Page” so that we are directed to where we can add content to the page. Do so by clicking on the “Edit Content” link. This will cause an edit box to appear where you can add text and images with styling options that code the HTML for you (if you are in the “design” tab).

Once we are done customizing our site, we can publish our application. There are several companies that are offering free WebMatrix hosting. You can find this information under the Publish icon on the ribbon or by clicking the link on your WebMatrix workspace.

And We created our DotNetNuke application.

DotNetNuke 7.3 Hosting with :: Multiple View Controls Within A DotNetNuke Module

clock November 6, 2014 05:42 by author Ben

This is a single that threw me for a long time, nevertheless the remedy is actually quite simple. Easy sufficient that i really don't understand why there is not much more documentation on it.

Here’s the scenario: You've got a module with two, or maybe more, achievable interfaces depending on the web page the module is additional to. The view handle features a blank important area and you cannot have copy crucial fields, blank or in any other case. How can you power the non-blank module control to point out around the page with out further coding?

The answer: make use of the module definitions.

Here’s how.

A number of assumptions very first:

You’ve developed a custom made DotNetNuke module.
You have at the very least two module controls in that module.
You've got a DotNetNuke set up to check on as well as the custom module is installed.

Now stick to these actions to show multiple view controls.

  1. Log in as the host user, open the extensions page, and click the edit icon to edit your module

  2. Your module already has a default definition that typically includes a view, edit and settings control.  The setup looks something like the picture below.  (Note: In editing this image I accidentally shortened the source paths.  The format should be DesktopModules/My Custom Module/View.ascx)

  3. Click the “Add Definition” link next the “Select Definition” drop down.

  4. On the new screen fill in the information to create the new definition and click “Create Definition”.  In this case I’m calling it “Definition 2″, but you’ll want to make your definition names descriptive, or whatever meets your naming convention needs.

  5. Now you’ll have a fresh new module definition to fill out just like the default definition.

  6. You can now add new module controls to the definition.  Click the “Add Module Control” link and fill out the form as a new View control by leaving the “Key” field blank.  Fill in the title field, select the source and leave the Type as “View”.

  7. Update the definition and navigate to the web page in which you would like to incorporate the module. Incorporate the module towards the webpage. In the event you had already additional the module you’ll require to delete it and incorporate it once again or else DotNetNuke will not operate the code to add all of the see controls. Once you incorporate the module you ought to see each check out handle you produced a definition for look around the page as being a individual module occasion. In the event you do not, return and verify you accomplished the steps properly.
  8. At this time whatever check out controls you really don't want to look on the web page, merely delete that instance from the module.


DotNetNuke 7.3 Hosting with :: Develop a Compiled DotNetNuke Module Utilizing the Visual Studio Starter Kit

clock Oktober 30, 2014 06:09 by author Ben

The Visual Studio Starter Kit enables you to create a compiled DotNetNuke module that can be much more compact, more quickly, and hide your supply code from prying eyes. The subsequent instructions can get you started and well in your approach to creating compiled DotNetNuke Modules.

  1. Download the Starter Kit
  2. Open Visual Studio  and create a new project (File -> New Project)

    From the dialogue follow these steps

    • Select Web from the Installed Templates. I use of VB.Net, but they are available in C# too.
    • Pick DotNetNuke Compile Module from your Project Type list.
    • Enter your Module Name
    • Enter the path for your DotNetNuke installation. Your project will be installed within the current set up within the DesktopModules folder and also the dll will likely be place in the bin folder.
    • Click OK
  3. Visual Studio will load up the venture within the Solution Explorer and open the Documentation.html in the editor. You’re not however ready to set up the module so don’t keep to the DotNetNuke documentation but.
  4. In the Solution Explorer right click on My Project and select Open.

  5. Within the Application tab delete the entry in Root Namespace except if this is your only module, otherwise you will not be sharing code with other modules. I have a undertaking that spans numerous modules and i want them all inside the identical identify space. So, I delete the basis Namespace entry to ensure that I am able to put within the appropriate namespace from the code driving. (Edit regarding Root Namespace; in C# you do not need to clear the namespace, but in VB.Net you are doing).

  6. Switch towards the Compile tab. Verify the Build output path and make sure its pointing towards the proper bin folder. Now simply click the Advance Compile Option on the button of the tab. Around the dialogue make certain the target framework is correct. You’ll see the environment on the base of the dialogue. At this point the dialogue will immediately near.
  7. Repeat step 4 (open the project properties) then go to step 8
  8. Switch to the References tab.  You should see a reference to DotNetNuke.Library version  Remove it.

  9. Nonetheless around the References tab, now click the Add button. Inside the Add Reference dialogue switch to the Browse tab and navigate for the DotNetNuke set up bin folder. Choose the DotNetNuke.dll, DotNetNuke.Web.dll, as well as the Telerik.Web.UI.dll. Should you do not hold the Telerik.Web.UI.dll then you definitely should not be making use of those controls and you also will not want the dll. Click Okay. These references are necessary to obtain access to the DotNetNuke methods and properties. In any other case you are code powering will be crammed with inexperienced and blue underlines, missing references, and, oh yeah, it won’t compile. Sort of defeats the aim, proper?

    Intellisense; this step is optional, but if you want Intellisense you’ll want to do this.  Switch to the Web tab. Under Servers select the “Use Local IIS Web server” option.  Change the Project URL to the full URL of your project (eg http://{domain}/DesktopModules/{project folder}).  Check “Override application root URL” and set it to the domain of your DotNetNuke install (eg http://{domain})
  10. Save the Project Properties and close it.
  11. Inside the Solution Explorer increase the Components folder and open up the ModuleNameController.vb (or .cs) file. Check the Namespace declaration and you’ll see that it states “YourCompany”. Change this to your customized namespace identifier and after that do the identical in each of the code powering documents. You will also need to change it inside the .ascx files because they’ll be reference the namespace inside the handle declaration at the best of the webpage.
  12. At this point you can Build your project and you will see the new dll in your DotNetNuke install bin folder.
  13. Now follow the instructions in the documentation.html to install the module in DotNetNuke.  Once the module is installed you don’t really need the documentation folder, or it’s files.  I usually delete it.

DotNetNuke 7.3 Hosting with :: Using the new Module Improvement Templates for DotNetNuke 7

clock Oktober 17, 2014 06:18 by author Ben

Obtaining up and operating with all the templates is really pretty straightforward, but you must stick to some really certain measures, not subsequent the measures tends to make it hard for anyone else in order to assist you as you can configure issues any number of ways that might cause difficulties.


Configuring your Development Atmosphere

This really is 1 from the most significant steps from the procedure, the templates are configured to operate in a site You'll find a couple of assets for placing up your environment. The crucial thing for your new release of the templates is you need to have DotNetNuke 7.3 operating at, unless of course needless to say you modify the templates your self, but that's outside of the scope of this weblog post.

Putting in the Templates

Installation in the templates is pretty simple, you'll find numerous techniques to complete this, select one in the a few choices beneath and carry out the actions outlined for the option you decide on. You simply have to do one of those choices, not all three.

  1. Put in utilizing the Tools\Extensions and Updates menu in Visible Studio 2012
    • Mouse more than the Tool menu
    • Click on Extensions and Updates
    • Search for DotNetNuke
    • Select the Put in button to the DotNetNuke Project Templates option
  2. Install manually by downloading the VSIX file from the online gallery
    • Pay a visit to the Visual Studio Gallery - DotNetNuke Project Templates page
    • Download the VSIX file via the Obtain website link.
    • Double click the downloaded file to install the templates.
  3. Set up manually by downloading from Codeplex
    • Down load the VSIX file from Codeplex
    • Updated - Right Click the downloaded VSIX and choose Properties
    • Click the UNBLOCK button before proceeding
    • Double click the downloaded file to install the templates.

Making your Visual Studio Project

As soon as you have put in the templates, you can set up a project based on the templates. To do so you need to stick to the steps under

  1. Set up Visual Studio 2012 (you need to have this done presently)
  2. Install the undertaking templates as instructed above
  3. Setup your DotNetNuke Advancement Environment as instructed over
  4. Operate Visual Studio 2012 as an Administrator (correct click on the shortcut to do so)
  5. File -> New Project
  6. Choose possibly C# or VB.Net from your Languages segment of the new Project dialog
  7. Pick the DotNetNuke Folder under your preferred language (C# or Visual Basic)
  8. Choose possibly DotNetNuke C# Compiled Module, DotNetNuke VB.Net Compiled Module, DotNetNuke 7 C# DAL2 Compiled Module or DotNetNuke 7 VB.Net DAL2 Compiled Module for the project template.
  9. For the new project creation screen using the following settings
    • Title: ModuleName (something distinctive here, instance MyModule)
    • Place: c:\websites\\desktopmodules\ (this assumes you set up your improvement surroundings as instructed in Step 3)
    • Solution: Create new solution (this option might not be exhibited, that's okay)
    • Create directory for solution : Unchecked (this may trigger route issues if checked, the templates presume the SLN is inside the same folder since the project file)
    • Add to source control: Unchecked (I typically get my undertaking operating before incorporating it to supply control)
  10. Click Ok
  11. In certain cases Visual Studio will change the DesktopModules folder in into a Digital Listing, this will cause problems with your environment, load IIS Supervisor (start>run>INETMGR) and take away the Virtual Directory if it appears as a single there.

Installing your Module in Improvement

Once you create your project in Visual Studio 2012 the module will exist within the c:\websites\\desktopmodules\MyModule folder, but it is not technically installed and registered with DotNetNuke. To complete that you need to execute the follow steps.

  1. Develop your Project in DEBUG mode.
  2. Modify to Release mode and build again.
  3. Login to your improvement website within a browser, using a HOST/SuperUser account.
  4. Navigate for the Host/Extensions web page
  5. Pick the Install Extension Wizard option
  6. Simply click Choose File
  7. Browse to your c:\websites\\desktopmodules\MyModule\Install\ choose either the INSTALL or SOURCE package to upload.
  8. Go through the measures for the installation wizard (if the module fails to install, attempt closing Visual Studio very first, then set up the module)
  9. Location your module on a page (I usually produce a fresh webpage for each module in my development environment for tests reasons).


Setting up your Module in Production

To install your module in production you'll keep to the same actions as installing it inside your improvement environment, other than you will nearly Never utilize the Source package of the module in creation, it just is not essential.

What’s Subsequent?

So I lastly received the 7.0 (7.3) templates out the door, what is subsequent? Reworking the DNNTaskManager module which i created a module advancement tutorial for back in 2011. The program is to actually rewrite that module from the ground up utilizing DNN seven.0, in a few distinct iterations. 1) Utilizing the unique DAL design in DotNetNuke, 2) Using the new DAL2 template, 3) Utilizing ContentItems in DotNetNuke 7. Keep tuned to my weblogs to learn more as those tutorials are produced.


We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions

Author Link

 photo ahp banner aspnet-01_zps87l92lcl.png

Corporate Address (Location)

170 W 56th Street, Suite 121
New York, NY 10019
United States

Tag cloud

Sign in