To develop modules for DotNetNuke you must first have a DotNetNuke installation running on the computer on which you intend to develop them. Setting up your development environment can vary based on what your end goal is. If you are doing module development for your own use, and within your own DNN environments, you can ignore a few of the settings below. If you are doing module development with the idea that you might turn around and give the modules away, or sell them, then you will likely want to follow the guidelines set forth below to support the widest array of DNN installation environments.
I recommend that each developer have their own local development environment, with a local IIS website running DotNetNuke, and a SQL Server 2008/2012 (not express, though you can use it) database for the website. Having an individual development environment makes group module development far easier than if you share environments/databases.
The steps for setting up your development environment will apply to both the Community and Professional editions of DotNetNuke.
Once you have the version selection out of the way you can go through the installation process. While I’m not going to walk you through the minutest of details of each step of installing DotNetNuke in this post, I will at least try to point you in the right direction for each step. Download the INSTALL package of the version of DotNetNuke you want to use in your development environment. Extract the files in the INSTALL package to a location of your choosing, this location is where you will point IIS (the web server) when we can configure the website. In my environment I typically use c:\web\dnnme.com\ (One item of note: you may need to right click on the ZIP file and choose Properties before extracting, on the properties window if you have an UNBLOCK option, click that. Some versions of Windows have started blocking files within the DotNetNuke ZIP files, which will cause you problems later during the actual install.)
IIS is the web server that comes with Windows computers. DNN 7 requires IIS 7 or later (7,7.5,8.0), so you will need at least Windows Vista, Windows 7, Windows 8, or Windows Server 2008 R2, Windows Server 2012. In IIS you should create a new website (Note: If you use an existing website in IIS be sure to add the HOST binding for DNNME.COM), and point to the folder where you extracted the INSTALL package.
Note: With DotNetNuke 7.0+, .NET Framework 4.0 is required, so be sure that your application pool is configured to run under 4.0, and not 2.0.
Set File Permissions
Setting up the file permissions for your DNN install is often the step that causes the most trouble. You should right click on the FOLDER in which you extracted DNN (c:\web\dnnme.com\) and choose properties. Choose the Security tab. You need to add permissions for the account in which your website's application pool is running under. You will want to setup the permissions to give the account Full or Modify permissions for the DNNME.COM folder. Which account you will use will vary based on your version of IIS, here’s a simple list of some of the default accounts based on the version of IIS.
- IIS Version Operating System Account
- IIS 7 Windows Vista, Windows Server 2008 localmachine\Network Service
- IIS 7.5 Windows 2008 R2, Windows 7 IIS AppPool\APPPOOLNAME
- IIS 8 Windows 2012, Windows 8 IIS AppPool\APPPOOLNAME
Note: If you are using IIS7.5/8.0 you’ll notice in the above table that we have APPPOOLNAME in the identity, this is because when you setup a new website in IIS a new application pool is created. In place of you should type in the name of the application pool that was created. You can also bypass this and configure your application pool to use the Network Service account instead of a dynamic account if you would like.
In SQL Server you should go through and create a new database. I always create a database with the same name as the website, so in this case DNNME.COM. Once you have created the database, create a user that can access that database. I always use SQL authentication, turn off the enforce password requirements, and give the user DB Owner and Public access to the DNNME.COM database. Remember the username and password you create here as you will need them when you walk through the Installation screen for DotNetNuke.
DotNetNuke Installation Screen
Populate the installation screen with the standard DNN information, Host username, password, etc. For the Database option, choose Custom and configure your database connection, providing the Server IP/Name, the Database name (dnndev.me). For the database authentication you'll want to choose the option that allows you to enter the username/password for the database user that you created previously.
Now there are two additional options you can configure, normally I would tell you not to modify these, but from a development environment perspective I do recommend that you change the objectQualifier setting. It should be blank by default, you should type in “dnn” (without quotes), this will prepend “dnn_” to all of the objects that get created by DNN such as Tables and Stored Procedures. This is not something I recommend from a production stand point, but if you are developing modules for sale, then supporting objectQualifier in your development is recommended. It will save you time down the road if you have a customer who has an objectQualifier defined on their production databases.