Dear visitor, thanks for stopping by! If you want, you can follow all updates on via RSS. You can also follow me on Twitter or Facebook. More interesting posts from other Microsoft Regional Directors can be found at The Region.
Gill Cleeren     .net | | Programming     January 1, 2007    

In this first part, I will show you how to set up a portal with DotNetNuke.
If you’re a beginner with DNN, you probably won’t be starting by cracking open the core of the framework. Instead, you’ll want to get your first DNN site up and running as soon as possible. Therefore, I advise you to download only the following files from the DNN site:

  • DotNetNuke 4.X Starter Kit
  • DotNetNuke 4.X Docs (optional)

I included the Docs-download, since you’ll be needing that sooner or later anyhow, when you’ll be delving deeper into DNN (and I’m sure you will after reading my article!).

The starter kit includes everything you’ll need right now: it’s a VSI (Visual Studio Content Installer) file, which will install a number of project and file templates to create your site and your modules in no time. In this very first part, we’ll be using the project template to create the site.

So, go ahead, and let the installer to its work. It’s recommended that you exit Visual Studio while installing, to prevent files from being locked. Should you get a warning while installing, simply ignore and continue the installer.


Now, let’s open Visual Studio. By using one of the installed templates, we’ll have it create an entire web application for us. Remember that I said earlier that DNN was written in Well, therefore, you will see the some templates only when you select in the language selector.

Select “Create New Website” , and set the language to Visual Basic. You should now be able to select “DotNetNuke Web Application Framework”. Select the location for your site and give it a name and finish by clicking OK. For now, let it install on the file system. Depending on your computer, it will take up to a few minutes before your site is ready.


When finished, you’ll see a HTML page in the editor window of your IDE, where all the additional actions you need to do are explained.
Because the explanations are not very long, I’ll go in a little more detail here.

First, create the database. You can use SQL Server 2000, SQL Server 2005 or SQL Server 2005 Express. I’ll be using SQL Server 2005 for the rest of this explanation; the other versions are very similar.
Open SQL Server Management Studio, and create a new database. I’ll name my database ArticleDemo, but you can name it whatever you like.


I use a “testuser”-account for the login on the database (so no trusted connection). For this, I created a login on the database server, and added this user to the users of the database.

No further actions are needed on this database, all tables and stored procedures will be created via script when you first run your portal.
Now we’ll be creating the site on IIS 7. Earlier, we let the site create on the file system. However, there is a known bug in DNN at the moment, that will make it impossible for users to subscribe on your site if you use the internal server instead of IIS. Therefore, we’ll use IIS!

Open IIS 7, and right-click on “Web Sites”, then select “Add Web Site”. In the dialog, enter the name of your site (I entered DemoDNN), and set the Physical Path to the directory where you let Visual Studio extract all the files. You can select to either use the DefaultAppPool, which is new in IIS 7, or you can use the IIS 6 model by selecting the “Classic .Net AppPool”, which is what I selected here.

To end with, set the port to something else than 80 (for example, 81 is OK). If you use my settings, you’ll be able to browse to your site via this URL: http://localhost:81/DemoDNN .


To be able to debug our portal from Visual Studio, Windows Authentication must be enabled.Under Authentication for the new site, simply enable Windows Authentication. If you have not configured IIS 7 correctly, you won’t be able to select this! See my other article to do this!


Since I’m doing this installation with Windows Vista, I’ve shown the necessary steps to get DNN running on IIS7. If you’re using Windows XP, you’ll be using IIS 5.1. In 5.1, you can’t create more websites than the default web site. In this case, you’ll be creating a virtual directory under this default web site, and you’ll connect to http://localhost/DemoDNN . If you use Windows 2003 with IIS 6, the set up is analogue.

To configure IIS 7 correctly to be able to debug from Visual Studio, see my other article!

Only 2 things left to do now.
First, we’ll make some changes in the web.config to make DNN use the newly created database. So, go ahead and open the web.config file. First, search for the connectionstrings-tag. You should see the following:

<!-- Connection String for SQL Server 2005 Express -->



      connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"

      providerName="System.Data.SqlClient" />

    <!-- Connection String for SQL Server 2000/2005




      providerName="System.Data.SqlClient" />-->

As you can see, this is a connection-string that’s OK should you be working with SQL Server Express and a datafile as database. In my case, it’s not what I need, since I’m using SQL Server 2005. So, comment out the first “add”, and uncomment the second one. Then, make the necessary changes to this one: use the correct server name, database name, user ID and password. I have created a login “testuser” on the database, with the password also set to “testuser”.
In my case, this is what the connection string will look like:


    <!-- Connection String for SQL Server 2005 Express -->



      connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"

      providerName="System.Data.SqlClient" />-->

    <!-- Connection String for SQL Server 2000/2005-->




      providerName="System.Data.SqlClient" />


Now, you have to change this connection string on one other place in the web.config. In the appSettings-tag, you’ll see the following line:

<add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>

Change the value-attribute to the same connection string as above, so in my case, you’ll get:

<add key="SiteSqlServer" value="Server=vista;Database=ArticleDemo;uid=testuser;pwd=testuser;"/>

You can now save the web.config.

The last thing we have to do before we can actually test the portal, is change the server on which your application should run.
Right-click on the project in the solution explorer, and select “Property Pages”. In the left-menu, select “Start Options”. Under “Server”, you’ll see that it is now set to “Use default web server”, in this case, the internal server. Remember that this is not what we wanted, so we’ll have it call IIS. Therefore, select “Use custom server”, and enter as Base URL the URL you specified in IIS (in my case: http://localhost:81/default.aspx ) .

Finally, click OK to close.


That’s about it! Now, let Visual Studio build the project, for now, we’ll do a debug build. Simply hit F5, and the build process will start. After a few moments (the first build is normally quite slow, so it might actually take a few minutes…), your browser will open.

At this point, DNN will start executing scripts (all called via code) and extracting files. This will also take a few minutes. Some versions of DNN throw an error here on the AppDomain being unloaded. You can ignore this however.

If you’re using DNN 4.4.0 or higher like me, the install will be shorter, because less is installed by default.


To finally access your portal, and see the result of all your hard work, click on the link at the bottom of the page. You should see the following screen.


There you go, your portal is ready! The installation was not that hard, was it?
In the next part, I’ll take you through the basic administrator settings, so you can start customizing your portal (because the standard is just… let’s say “standard”)!

  Posted on: Monday, January 01, 2007 3:34:52 PM (Romance Standard Time, UTC+01:00)   |   Comments [0]
5/26/2015   7:23:21 AM
 Welcome to
Hello and welcome to!

My name is Gill Cleeren, I'm a Microsoft Regional Director and an MVP ASP.NET.
On, you'll find all kind news and articles on .net, ASP.NET, WPF, Silverlight and Microsoft in general.
More on me can be found on my about page.

Should you have any questions, don't hesitate to contact me by Send mail to the author(s) .

 Partner sites
 Most popular tags
.net (124) .net 3.0 (6) .net 3.5 (18) .NET 4 (18) .NET Show (1) (4) (53) AJAX (4) ASP.NET MVC (3) Atlas (12) Azure (2) Blend (2) Book (6) Book review (4) C# (43) Case studies (1) Chopsticks (3) Community (10) Community Day (16) Consoles (1) Database (1) DevDays09 (4) DotNetNuke (4) Efficiency (57) Enterprise Library (5) Events (62) Expression (7) Games (3) Hardware (9) Internet (18) IT (1) jQuery (1) LightSwitch (3) Links (11) LINQ (4) Mac (2) Metro (1) Microsoft (75) Mix 07 (6) Mix 08 (4) Mix 09 (1) Mix 11 (1) Movies (4) MVP (5) MVP Summit 2008 (3) mvvm (1) NDCOslo (1) Office 2007 (10) Other (8) PDC (22) PDC2008 (10) Personal (36) ppt (9) Programming (52) Programming tools (22) Regional Director (2) Silverlight (143) Silverlight Advent Calendar (24) sl4 (44) SL5 Data and Services Cookbook (2) Slide decks (13) Snowball (13) Software (20) Microsoft (25) Speaking (15) SQL Server (10) TechDays (13) TechEd (14) telerik (6) Telerik (6) TFS (1) Twitter (1) Vista (73) Vista Tricks (9) Visual (38) Visug (33) VS2010 (8) Wallpaper (2) WCF (2) Webcasts (9) Webinars (5) Windows (41) Windows 7 (5) Windows 8 (3) Windows Azure (2) Windows Mobile (3) Windows Phone 7 (2) WinFX (17) WinRT (2) WP7 (2) WPF (40) XAML (24)

 On this page
 This site
 Blogroll OPML

All content is property of Nothing on this site can be copied or published elsewhere, unless otherwise stated.

This site is made by Gill Cleeren.

Questions? Opinions? Send mail to the author(s) E-mail