DotNetNuke (DNN) Upgrade Strategy (DNN 4.3.7 to DNN 4.6.0)

Source: Internet
Author: User
Tags dnn dotnetnuke
We recommend that you back up the website and upgrade it on the backup website. After the upgrade, you can use the backup website to replace the previous website. The main steps are as follows:
  1. Back up website
  2. Rebuild the backup website to make it run
  3. Upgrade on the backup website
  4. After the upgrade, replace the previous website with the backup website.

Assume that the website to be upgraded is located on an IIS server on the LAN. The IP address is 159.21.121.15, and "http:
// Www.yourdomainname.com "access. The website name in IIS manager is" DNNWebsite "and the main directory is" D: \ DotNetNuke ". use SQL
2000 database, database name: "WebsiteDNN", database file: "D: \ Program Files \ Microsoft SQL Server \ MSSQL \ Data \ WebsiteDNN_Data.MDF" and "D: \ Program Files \ Microsoft SQL Server \ MSSQL \ Data \ WebsiteDNN_Log.MDF ".

1. Back up websites

To back up a file, you only need to back up the website file directory and database file.

  • To facilitate access to the backup website that is rebuilt after the backup, we need to add an alias for the website before the backup. Here I add an alias for "http: // 159.21.121.15"
  • Copy "D: \ DotNetNuke" to "E: \ WebsietBackup \ DotNetNuke"
  • Stop the SQL Service and run "D: \ Program Files \ Microsoft SQL Server \ MSSQL \ Data \ WebsiteDNN_Data.MDF" and
    "D: \ Program Files \ Microsoft SQL Server \ MSSQL \ Data \ WebsiteDNN_Log.MDF" These two Files are copied to "E: \ WebsiteBackup \ Database \" to keep the original file name.

    Now the backup is complete.

    2. Rebuild the backup website to make it run

    Because the original website is still there, we will operate it directly on the backup website.

    • Modify the permission settings of the "E: \ WebsietBackup \ DotNetNuke \" directory to NETWORK
      Add full control permissions to the SERVICE account. Note: in Windows 2000/IIS5 Window XP Pro, {Server} "ASPNET
      In Windows 2003/IIS6, there is an nt authority "network service account.
    • Attach the Database file "E: \ WebsiteBackup \ Database \" to a new Database named "DNNWebstieUpgrade, modify the database security settings of "DNNWebsiteUpgrade" to make it the same as the security settings of the original website.
    • Modify the Web in "E: \ WebsiteBackup \ DotNetNuke. the config file is used to modify the database connection. If the security settings are the same, you only need to change the database name from "DNNWebsite" to "DNNWebsiteUpgrade ".
    <! -- Connection String for SQL Server 2000/2005 -->
    <Add name = "SiteSqlServer"
    ConnectionString = "Server = (local); Database = WebsiteDNN WebsiteDNNUpgrade; uid = WebDNNAdmin; pwd = ourpassword ;"
    ProviderName = "System. Data. SqlClient"/>
      • Create a new "website" in IIS named "DNNWebsiteUpgrade", set the main directory to "E: \ WebsiteBackup \ DotNetNuke \", and set the Host header to "159.21.121.15 ", and do not forget to put ASP. NET version is set to 2.0
      • Now, open IE and enter "http: // 159.21.121.15" in the address bar to access the rebuilt backup website.
      3. Upgrade the backup website

      Next, we will upgrade the backup website.

      • First, download the latest DNN package from www.dotnetnuke.com. I am using DotNetNuke_04.06.00_Install.zip.
      • Backup the web. config file under "E: \ WebsiteBackup \ DotNetNuke \" is webBackup. config, which can be directly backed up in the current directory.
      • Decompress dotnetnuke_04.06.00_install.zip to the "E: \ WebsiteBackup \ DotNetNuke \" directory to overwrite the previous files. The web. config file has been replaced by web. config in the installation package.
      • Open web. in the config file, the previous settings are restored, including database connection, language region, and Machine Key. Remember to restore the Machine Key, otherwise, all previous users of the upgraded website will not be able to log on.


      Database:

      First, comment out the default SQL 2005 Express settings and take the following part: <! -- Connection String for SQL Server 2005 Express -->
      <Add
      Name = "SiteSqlServer"
      ConnectionString = "Data Source =. \ SQLExpress; Integrated Security = True; User Instance = True; AttachDBFilename = | DataDirectory | Database. mdf ;"
      ProviderName = "System. Data. SqlClient"/>

      To: <! -- Connection String for SQL Server 2005 Express
      <Add
      Name = "SiteSqlServer"
      ConnectionString = "Data Source =. \ SQLExpress; Integrated Security = True; User Instance = True; AttachDBFilename = | DataDirectory | Database. mdf ;"
      ProviderName = "System. Data. SqlClient"/> -->

      Then, remove the notes from SQL Server 2000/2005 Standard Edition. <! -- Connection String for SQL Server 2000/2005
      <Add
      Name = "SiteSqlServer"
      ConnectionString = "Server = (local); Database = DotNetNuke; uid =; pwd = ;"
      ProviderName = "System. Data. SqlClient"/>
      -->

      Find the connectionString value in the webBackup. config file and replace the original settings. As follows:

      <! -- Connection String for SQL Server 2000/2005 -->
      <Add
      Name = "SiteSqlServer"
      ConnectionString = "Server = (local); Database = WebsiteDNNUpgrade; uid = WebDNNAdmin; pwd = yourpassword ;"
      ProviderName = "System. Data. SqlClient"/>

      There is also an SQL connection setting block, which is set to maintain compatibility and needs to be modified,
      First, comment out the default SQL 2005 Express settings and take the following part:

      <! -- Connection String for SQL Server 2005 Express-kept for backwards compatability-legacy modules -->
      <Add key = "SiteSqlServer" value = "Data Source =. \ SQLExpress; Integrated Security = True; User Instance = True; AttachDBFilename = | DataDirectory | Database. mdf;"/>

      To:

      <! -- Connection String for SQL Server 2005 Express-kept for backwards compatability-legacy modules
      <Add key = "SiteSqlServer" value = "Data Source =. \ SQLExpress; Integrated Security = True; User Instance = True; AttachDBFilename = | DataDirectory | Database. mdf; "/> -->

      Then, remove the notes from SQL Server 2000/2005 Standard Edition. <! -- Connection String for SQL Server 2000/2005-kept for backwards compatability-legacy modules
      <Add key = "SiteSqlServer" value = "Server = (local); Database = DotNetNuke; uid =; pwd =;"/>
      -->

      To: <! -- Connection String for SQL Server 2000/2005-kept for backwards compatability-legacy modules -->
      <Add key = "SiteSqlServer" value = "Server = (local); Database = WebsiteDNNUpgrade; uid = WebDNNAdmin; pwd = yourpassword;"/>



      Language Region
      : Modify this part <Globalization
      Culture = "en-US"
      UiCulture = "en"
      RequestEncoding = "UTF-8"
      ResponseEncoding = "UTF-8"
      FileEncoding = "UTF-8"/>

      Is: <Globalization
      Culture = "zh-CN"
      UiCulture = "zh-CN"
      RequestEncoding = "UTF-8"
      ResponseEncoding = "UTF-8"
      FileEncoding = "UTF-8"/>


      The most important part is MachineKey,
      Find this part: <MachineKey
      ValidationKey = "F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902"
      DecryptionKey = "F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902F8D923AC"
      Decryption = "3DES"
      Validation = "SHA1"/>

      Find this part from the backup webBackup. config file, copy the values of validationgKey and decryptionKey, and replace the above original settings.Remember to do this step !!

      By now, the web. config file has been modified and you can start the exciting upgrade process.

      Open IE and enter "http: // 159.21.121.15". If the previous steps are correct, you can see the following upgrade information:
      Update completion information: Update completion Information
      Upgrading DotNetNuke
      Current Assembly Version: 04.06.00
      Current Database Version: 04.03.07

      Upgrade Status Report
      00:00:00. 046-Upgrading to Version: 4.6.0
      00:00:00. 109-Executing Script: 04.04.00.SqlDataProvider Error! (See 04.04.00.log for more information)
      00:00:00. 906-Executing Script: 04.04.01.SqlDataProvider Success
      00:00:00. 937-Executing Script: 04.05.00.SqlDataProvider Success
      00:00:01. 609-Executing Script: 04.05.01.SqlDataProvider Success
      00:00:01. 812-Executing Script: 04.05.02.SqlDataProvider Success
      00:00:02. 734-Executing Script: 04.05.03.SqlDataProvider Success
      00:00:03. 171-Executing Script: 04.05.04.SqlDataProvider Success
      00:00:03. 218-Executing Script: 04.05.05.SqlDataProvider Success
      00:00:03. 218-Executing Script: 04.06.00.SqlDataProvider Success
      00:00:03. 812-wide Ming General Upgrades
      00:00:05. 765-Installing Module File Adsense_01.00.01_Install: Success
      00:00:06. 296-Installing Module File HTML_04.06.00_Install: Success
      00:00:06. 906-Installing Module File Links_03.03.07_Install: Success
      00:00:07. 343-Installing Package File LiveID_01.00.00_Install: Success
      00:00:07. 890-Installing Package File OpenID_01.00.00_Install: Success
      Upgrade Complete

      Click Here To Access Your Portal

      4. After the upgrade, replace the previous website with the backup website.

      After the upgrade, you can use http: // 159.21.121.15 to access the website after the upgrade. Check whether some of the third-party modules you use can run normally in the new version, is the previous skin normal? If everything is perfect, you can use the upgraded website to replace the previous website.

      This step is relatively simple and I will not elaborate on it, mainly as follows:

      • Delete the "D: \ DotNetNuke" directory and copy "E: \ WebsiteBackup \ DotNetNuke" back to D: disk. Remember to modify the permission settings and reset the main directory in IIS. Note: If the directory is in use during deletion, stop IIS and kill the process and try again.
      • The database file is also copied back to the original location. Before the database is deleted, it is reappended to WebsiteDNN to reset the security settings.
      • Modify the database connection settings in the web. config file to connect to DNNWebsite.
      • Run the iisreset command to restart IIS.

      Contact Us

      The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

      If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

      A Free Trial That Lets You Build Big!

      Start building with 50+ products and up to 12 months usage for Elastic Compute Service

      • Sales Support

        1 on 1 presale consultation

      • After-Sales Support

        24/7 Technical Support 6 Free Tickets per Quarter Faster Response

      • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.