Register | Login
 Setup Existing DNN Site on Local Host    

How to Setup an Existing DNN Site as a Local Host.

Introduction

The goal of these instructions is to make the local IIS and SQL Server environment reflect the following scenario:

·         The database is stored separately from the file system (versus default DNN installation location below \App_Data).

·         SQL authentication is used to access the database (versus Windows authentication).

·         The database "Auto attach" feature is not used. (versus default DNN web.config setting: AttachDBFilename=|DataDirectory|...). 

Step-by-Step instructions

Setup Local Instance of DNN Database

1.      Open the Control Panel of the DNN Service Provider

2.      Perform an SQL database backup to [DNNBackup.bak]

3.      FTP the [DNNBackup.bak] file to a local temporary location of your choice.

4.      Open SQL Server Management Studio

5.      Connect to the local SQLEXPRESS server instance with Windows authentication.

6.      Restore [DNNBackup.bak] to [LocalDNN-Date].
NOTE: I append the backup date like, “-MMDD” in order to allow multiple copies of website. I prefer to use the default MSSQL data folder for the databases (e.g.: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data).

7.      Create SQL Server level login to match remote host UID and PWD.

8.      Select the root server connection, right-click and select properties, then Set Server login security properties

9.      Note: Verify that mixed mode authentication is enabled.

10.  Verify login by connecting to local SQL server. Select [LocalDNN-Date], select Tables, right-click and select New Table. If a design window appears with Column Name and Data type then the permission is valid.

11.  Match SQL Portal Address with Local Web Site.

12.  In SQL Manager open the PortalAlias table and manually update the HTTPAlias [domain.com] values to localhost/[LocalDNNfolder] 

13.  Alternative: Open New Query and create script similar to following and then Execute.
USE [LocalDNNDB-Date]
UPDATE    PortalAlias
SET       HTTPAlias = REPLACE(HTTPAlias, '[domain.com]', 'localhost/[LocalDNNfolder-Date]')           

Setup Local Instance of DNN Files

1.      FTP Remote DNN folders and files to C:\Inetpub\wwwroot\[LocalDNNfolder-Date].

2.      Set folder security for C:\Inetpub\wwwroot\[LocalDNNfolder]. Add ASPNET and give it full access.

NOTE: Verify that \DesktopModules subfolder has full ASPNET permissions to prevent "Access Denied" errors when installing modules. 

Set Local IIS Properties

1.      Open IIS Manager. Create new IIS virtual folder Alias = [LocalDNNfolder].

2.      Leave default Access Permissions: Read and Run scripts.

3.      Right-click on new virtual folder and select properties.

4.      Select Documents tab then Add "Default.aspx"

5.      Select ASP.NET tab, select ASP.NET version 2.0.x then click Apply.

6.      Click Edit Configuration and make the following changes to the Connection string manager and Application settings SiteSqlServer values:

7.      "Server=[MachineName]\SQLEXPRESS;Database=[LocalDNNDB-Date];uid=[user];pwd=[password]"

8.      Click OK.

9.      Click OK. 

Test Local Web Site

1.      Open Internet browser. Enter new local web site in browser: http://localhost/[LocalDNNfolder-Date]

2.      NOTE: To access child portals use the following syntax:

3.      http://localhost/[LocalDNNfolder]/Default.aspx?alias=localhost/[LocalDNNfolder]/[ChildPortalFolder]

4.      Optional: Download, install and run free Text Replacement Tool (free) module from http://www.iowacomputergurus.com or F3 module (free) from http://www.engagesoftware.com/  to change HTLM image src paths. Example: from src="/Portals/ to src="/[LocalDNNfolder]/Portals/

5.      Finished! 

 

Created: 09/07/2009 /Chris Miller
Revised: 07/12/2010 /Chris Miller

   
 Print