Successful completion of this walkthrough requires following components:
- Any flavor of Windows XP or Windows Server 2003.
- .NET Framework 2.0.
- UltiDev Cassini Web Server 2.0
- SQL Server 2005 – Complete or Express version
- SQL Server Management Studio – Complete or Express version
- DotNetNuke 4.0.2 Install package
The article assumes readers are able to perform basic SQL Server 2005 management operations, like installing SQL Server and creating a new database.
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 UltiDev Cassini Web Server – 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 this Codeproject article, or to UltiDev Cassini Developer's Guide. 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.
Part I - DotNetNuke Installation.
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.
- Download DotNetNuke 4.0.2 Install Package. Unpack the ZIP file into C:\DNN folder.
- Navigate to C:\DNN folder and copy release.config file to web.config.
- If you don't have SQL Server 2005 install, download and install SQL Server 2005 Express and its management console – SQL Server Management Studio. 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)
- Use SQL Server Management studio to connect to SQL Server Express you just installed. Once there, create new database:
…call it DotNetNuke and make sa or some other high-powered SQL login an owner of the database:
- Navigate to DNN's database users and make dbo an owner of the database by double-clicking on the dbo user
…and then adding db_owner schema to set of schemas owned by dbo:
- 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:
<!-- Connection String for SQL Server 2005 Express -->
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DotNetNuke;Integrated Security=True;"
<!-- 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;"/>
Part II – Running DotNetNuke on UltiDev Cassini.
- Download and install UltiDev Cassini Web Server 2.0.
- From Start | All Programs | UltiDev | Cassini ASP.NET Server, launch Cassini Explorer utility to register DotNetNuke application with the server.
- Fill out form fields highlighted below and hit Generate button.
IMPORTANT NOTE: 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!
- Click Save button:
- Click this link to start DotNetNuke running under Cassini:
- And here it is: DotNetNuke running on Cassini:
After DNN is done initializing itself, scroll browser window down and launch the DNN:
and enjoy DNN on Cassini:
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 debug and distribute any ASP.NET applications, including DotNetNuke-based ones, with UltiDev Cassini.
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.