For the benefit of everyone using DNN, below are some easy to follow steps when migrating your webportal.
This has been tried and tested with versions 4.6.4 (If i remember correctly).
Migrating DNN Web portal files:
1. Depending on how you have set up DNN in your development environment, you need to copy the main folder and move this from your development environment to your production environment. (If you did not set up DNN you can work out which folder you need by opening IIS and seeing as to what folder has been set as the home directory).
2. Copy the folder into the directory of your current installation. (This will overwrite your existing web portal files so be sure to backup the original installation files before hand). If there is no existing DNN installation, set the DNN portal up by copying the folder into the C:\Inetpub\wwwroot folder if it has not already been done so. (You may also just copy it to your Inetpub folder).
3. Modify the webconfig file in the DNN folder to contain the correct SQL user account information that will access the database that you have just restored.
4. You need to give the DNN folder the correct permissions in order for it to function. You need to ensure that the folder (and child folders) has the ASPNET and NETWORK SERVICE accounts associated with them.
Migrating DNN Web portal files and Database:
1. Make a full back up of the database that you want to migrate from the development environment and copy or move it to a location in the production server.
2. Depending on how you have set up DNN in your environment, you need to copy the main folder and move this from your development environment to your production environment. (If you did not set up DNN you can work out which folder you need by opening IIS and seeing as to what folder has been set as the home directory).
3. Now we have the database and the correct DNN folder on the production server. Setup the DotNetNuke database if you have not already done so and restore the database from the backup so you have a database ready for use by DNN. You will need to create a user account for the database for DNN to use in order to write and read information to it. (Ensure that the account has the appropriate permissions)
4. If you have an existing DNN installation, copy the folder into the directory of your current installation. (This will overwrite your existing website files so be sure to backup the original installation files before hand). If there is no existing DNN installation, set the DNN portal website up by copying the folder into the C:\Inetpub\wwwroot folder if it has not already been done so. (You may also just copy it to your Inetpub folder).
5. Modify the webconfig file in the DNN folder to contain the correct SQL user account information that will access the database that you have just restored.
6. You need to give the DNN folder the correct permissions in order for it to function. You need to ensure that the folder (and child folders) has the ASPNET and NETWORK SERVICE accounts associated with them.
7. The last step you need to do is, modify the HTTPAlias as the HTTPAlias in the database contains the one of the development environment. Change this to your new alias. i.e. from dotnetnukedev.augen to augen.com
Ideally when making changes to the portal in terms of layout customisation or functionality you would only ever need to copy those modified files and the dll in the bin folder over. I find it safer to copy the whole folder so as to not cause any complications for example inadvertently copying a file to the wrong folder. It is imperative that you add the ASPNET and NETWORK SERVICE accounts to the folder and its child folders so that DNN is permitted to run.
You would not really need to move the database from development to the production environment, however if you do please ensure that you are not going to overwrite a database that is in use and contains live and up to date information. In this case you may have to take the production website offline so the database cannot be further modified, and copy this database and restore it to the development environment where you can make you changes before copying it back to the production server and restoring it.
Trouble shooting:
1. The website does not load up? Have you set the permissions on the DNN folder that you have migrated (ASPNET and NETWORK SERVICE)? Have you created an SQL server user account that DNN can use?
2. Does you web portal load up without any problems but you just don’t seem to be able to login? This is because the machine key in your web config while is different from what has been registered in the database. This only occurs if two separate instance of DNN were set up, one on the development environment and one in the production environment. This in turn generates different machine keys and is linked to a specific database and will make you migration a little tricky. If you have migrated and restored the development database to the production environment ensure that you overwrite the existing DNN web portal files with the files from the development environment and make the necessary changes.