May 27, 2008 - DotNetNuke    Comments Off on Installing DotNetNuke 4.4.1 – Clean Install Windows 2000/XP

Installing DotNetNuke 4.4.1 – Clean Install Windows 2000/XP

[b:2dkmkjha]By [url=http://www.codeproject.com/script/Articles/list_articles.asp?userid=1181616:2dkmkjha]Vlad Hrybok[/url:2dkmkjha][/b:2dkmkjha].
This article describes how to run DotNetNuke content management system on UltiDev Cassini web server, which unlike IIS can run on Windows XP Home and can be redistributed along with the DotNetNuke applications.

Successful completion of this walkthrough requires following components:
– Any flavor of Windows XP or Windows Server 2003.
– [url=http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en:2dkmkjha].NET Framework 2.0[/url:2dkmkjha].
– [url=http://ultidev.com/download/RegisterAndDownload.aspx?ProductID=1d88ebae-587f-4e04-8ae8-0b2e98dcdae5:2dkmkjha]UltiDev Cassini Web Server 2.0[/url:2dkmkjha]
– SQL Server 2005 – Complete or [url=http://msdn.microsoft.com/vstudio/express/sql/download/:2dkmkjha]Express[/url:2dkmkjha] version
– SQL Server Management Studio – Complete or [url=http://www.microsoft.com/downloads/details.aspx?FamilyId=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en:2dkmkjha]Express[/url:2dkmkjha] version
– [url=http://prdownloads.sourceforge.net/dnn/DotNetNuke_4.0.2_Install.zip?download:2dkmkjha]DotNetNuke 4.0.2 Install package[/url:2dkmkjha]
The article assumes readers are able to perform basic SQL Server 2005 management operations, like installing SQL Server and creating a new database.

[size=130:2dkmkjha]Introduction[/size:2dkmkjha]

If you plan to run your DotNetNuke application on systems that can’t run IIS, like Windows XP Home, or if your customers lack skills necessary to install and maintain IIS, you should consider distributing your DNN-based application with [url=http://ultidev.com/Products/Cassini/:2dkmkjha]UltiDev Cassini Web Server[/url:2dkmkjha] – a small redistributable web server capable of running ASP.NET applications without IIS.

The instructions on how to make redistributable package for an ASP.NET application including UltiDev Cassini Web Server, please refer either to [url=http://www.codeproject.com/aspnet/AspNetAppsWithoutIIS.asp:2dkmkjha]this Codeproject article[/url:2dkmkjha], or to [url=http://www.ultidev.com/products/Cassini/CassiniDevGuide.htm:2dkmkjha]UltiDev Cassini Developer’s Guide[/url:2dkmkjha]. Most of this walkthrough has to do with installing DotNetNuke itself, including creating its database and specifying correct connection string in its web.config file. Once that is done, actual registration of DNN with Cassini server and running the application is really a piece of cake.
Well, let’s get our hands dirty. For simplicity sake, we’ll put SQL Server 2005 that is an underpinning of DNN, on the same box where DNN is running. If you have experience with installing and configuring DNN, then install DNN your way, skip Part I and go straight to Part II.

[size=130:2dkmkjha]Part I – DotNetNuke Installation.[/size:2dkmkjha]

This part is just a straight up DNN installation and has nothing to do with running it on Cassini. If you know how to install DNN, please install it and skip to the Part II.
[list=1:2dkmkjha]
[*:2dkmkjha]Download [url=http://prdownloads.sourceforge.net/dnn/DotNetNuke_4.0.2_Install.zip?download:2dkmkjha]DotNetNuke 4.0.2 Install Package[/url:2dkmkjha]. Unpack the ZIP file into C:\DNN folder. [/*:m:2dkmkjha]
[*:2dkmkjha]Navigate to C:\DNN folder and copy release.config file to web.config. [/*:m:2dkmkjha]
[*:2dkmkjha]If you don’t have SQL Server 2005 install, [url=http://msdn.microsoft.com/vstudio/express/sql/download/:2dkmkjha]download and install SQL Server 2005 Express[/url:2dkmkjha] and its management console – [url=http://www.microsoft.com/downloads/details.aspx?FamilyId=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en:2dkmkjha]SQL Server Management Studio[/url:2dkmkjha]. Accept all defaults while installing SQL Server Express. (If you have SQL Server 2000 or 2005 installed on this or other box, and you know how to use it, then just create a new database on it and call it DotNetNuke. You may then skip steps explaining how to create a database and format a connection string for your ASP.NET application) [/*:m:2dkmkjha]
[*:2dkmkjha]Use SQL Server Management studio to connect to SQL Server Express you just installed. Once there, create new database:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/NewSQL05DB.PNG[/img:2dkmkjha]

…call it DotNetNuke and make sa or some other high-powered SQL login an owner of the database:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/NameDNNDatabase.PNG[/img:2dkmkjha]
…click OK. [/*:m:2dkmkjha]
[*:2dkmkjha]Navigate to DNN’s database users and make dbo an owner of the database by double-clicking on the dbo user
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/DNNDatabaseUsers.PNG[/img:2dkmkjha]

…and then adding db_owner schema to set of schemas owned by dbo:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/DboAsDboForDnnDatabase.PNG[/img:2dkmkjha]
Click OK. [/*:m:2dkmkjha]
[*:2dkmkjha]Modify web.config file in C:\DNN folder by replacing connection string value to point to the newly created database. The connection string should look like "Data Source=.\SQLEXPRESS;Initial Catalog=DotNetNuke;Integrated Security=True". Edit web.config file to look like this:


[code:2dkmkjha]<connectionStrings>
<!– Connection String for SQL Server 2005 Express –>

<add name="SiteSqlServer"
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DotNetNuke;Integrated Security=True;"

<appSettings>
<!– Connection String for SQL Server 2005 Express – kept for backwards compatability – legacy modules –>
<add key="SiteSqlServer" value="Data Source=.\SQLEXPRESS;Initial Catalog=DotNetNuke;Integrated Security=True;"/>[/code:2dkmkjha]
[size=130:2dkmkjha]Part II – Running DotNetNuke on UltiDev Cassini.[/size:2dkmkjha]

[list=1:2dkmkjha]
[*:2dkmkjha][url=http://ultidev.com/download/RegisterAndDownload.aspx?ProductID=1d88ebae-587f-4e04-8ae8-0b2e98dcdae5:2dkmkjha]Download[/url:2dkmkjha] and install UltiDev [url=http://ultidev.com/products/Cassini/:2dkmkjha]Cassini Web Server 2.0[/url:2dkmkjha]. [/*:m:2dkmkjha]
[*:2dkmkjha]From Start | All Programs | UltiDev | Cassini ASP.NET Server, launch Cassini Explorer utility to register DotNetNuke application with the server. [/*:m:2dkmkjha]
[*:2dkmkjha]Fill out form fields highlighted below and hit Generate button.
[b:2dkmkjha]IMPORTANT NOTE[/b:2dkmkjha]: [i:2dkmkjha]Please be sure you uncheck "Always keep application in memory" checkbox before you ran the DNN for the first time. Otherwise DNN will not install itself correctly and you will have to remove DNN application files, delete the DB and start everything from scratch![/i:2dkmkjha]
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/RegisteringDNNWithCassiniStep1.PNG[/img:2dkmkjha] [/*:m:2dkmkjha]
[*:2dkmkjha]Click Save button:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/RegisteringDNNWithCassiniStep2.PNG[/img:2dkmkjha] [/*:m:2dkmkjha]
[*:2dkmkjha]Click this link to start DotNetNuke running under Cassini:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/CassiniExplorerSummaryWithDNN.PNG[/img:2dkmkjha] [/*:m:2dkmkjha]
[*:2dkmkjha]And here it is: DotNetNuke running on Cassini:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/DNNInitializationStarted.PNG[/img:2dkmkjha]

After DNN is done initializing itself, scroll browser window down and launch the DNN:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/DNNInitializationComplete.PNG[/img:2dkmkjha]

and enjoy DNN on Cassini:
[img:2dkmkjha]http://ultistudios.com/Screenshots/DNNonCassiniArticle/DotNetNukeRunningOnUltiDevCassiniWebServer.PNG[/img:2dkmkjha]To improve DNN’s first-page-served response time, you may want to prevent DNN from being unloaded by ASP.NET. To do that, go back to Cassini Explorer, Edit DNN’s application settings and mark the "Always keep application in memory" checkbox, and Save configuration. It’s important to do that AFTER DNN initialized itself, so please run DNN in a browser first, and only then change the "keep application in memory" flag.

If you want to dig deeper, find out how to [url=http://www.ultidev.com/products/Cassini/CassiniDevGuide.htm:2dkmkjha]debug and distribute[/url:2dkmkjha] any ASP.NET applications, including DotNetNuke-based ones, with UltiDev Cassini.

[size=130:2dkmkjha]UPDATE:[/size:2dkmkjha]

Recent DotNetNuke 4.3.x. Install version is much easier to install and run under UltiDev Cassini than DNN 4.0.x. It does not need a database to be created upfront, or connection strings changed in web.config. Just download DNN, unzip it, register it with UltiDev Cassini Web Server and run it from Cassini Explorer. No need to even have SQL Server Management Studio downloaded. [/*:m:2dkmkjha][/list:o:2dkmkjha][/*:m:2dkmkjha][/list:o:2dkmkjha]