Software H.Q. >> Dotnetnuke >> DNN Upgrading Website - Part 2
 




Dotnetnuke - Upgrading Website (TUTORIAL)

Part 2 of 3 :

This stage involves making changes to a very important file called "web.config". This file appears as "release.config" within new versions of Dotnetnuke. This file needs to be modified as per below and then renamed to "web.config". Therefore the new configuration information for the new versions are retained and only certain information from the old web.config file is re-used. However, the following steps should be followed :

1. Backup the website. Make sure there is a backup of the website data, and the website database information. Just in case something does go wrong during the upgrade process, you can restore the website to its previous working stage. This also means a backup of the web.config file itself.

2. Several areas of the web.config file should be modified.

This section :

<connectionStrings>
    <!-- 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" />
    <!-- Connection String for SQL Server 2000/2005
    <add
      name="SiteSqlServer"
      connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
      providerName="System.Data.SqlClient" />
   -->
</connectionStrings>

Should become :

<connectionStrings>
    <!-- Connection String for SQL Server 2005 Express -->
    <add name="SiteSqlServer"
connectionString="Server=XXX.YYY.ZZZ.ZZZ;Database=DBName;uid=DB_User;pwd=*****;"
providerName="System.Data.SqlClient" />
    <!-- Connection String for SQL Server 2000/2005
    <add name="SiteSqlServer"
connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"
providerName="System.Data.SqlClient" />
   -->
</connectionStrings>

 

Also, this section :

<appSettings>
    <!-- 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;"/>
    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules
    <add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;"/>
    -->
    <add key="InstallTemplate" value="DotNetNuke.install.config" />
    <add key="AutoUpgrade" value="true" />
    <add key="InstallMemberRole" value="true" />
    <add key="ShowMissingKeys" value="false" />
    <add key="EnableWebFarmSupport" value="false" />
    <add key="EnableCachePersistence" value="false"/>
    <add key="HostHeader" value="" /><!-- Host Header to remove from URL so "www.mydomain.com/johndoe/Default.aspx" is treated as "www.mydomain.com/Default.aspx" -->
    <add key="RemoveAngleBrackets" value="false" />
    <!--optionally strip angle brackets on public login and registration screens-->
  </appSettings> 

 Should become :

<appSettings>
    <!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules   -->
    <add key="SiteSqlServer" value="Server=XXX.YYY.ZZZ.ZZZ;Database=DBName;uid=DB_User;pwd=*****;" />
    <!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules
    <add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;"/>
    -->
    <add key="InstallTemplate" value="DotNetNuke.install.config" />
    <!--  Alternative Install Templates (included in package)
    <add key="InstallTemplate" value="Club.install.config" />
    <add key="InstallTemplate" value="Personal.install.config" />
    <add key="InstallTemplate" value="SmallBusiness.install.config" />
    -->
    <add key="AutoUpgrade" value="true" />
    <add key="InstallMemberRole" value="true" />
    <add key="ShowMissingKeys" value="false" />
    <add key="EnableWebFarmSupport" value="false" />
    <add key="EnableCachePersistence" value="false" />
    <add key="InstallationDate" value="8/25/2006" />
  </appSettings>

Note that it has not made any difference using the section of code for SQL server 2005 Express, rather than the code listed under the comment for SQL server 2000/2005, since they are exactly the same code. Just ensure that the section that you are not using is commented out so it will not be used.

 

Also, this section :

<system.web>
    <machineKey
      validationKey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902"
      decryptionKey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902F8D923AC"

      decryption="3DES"
      validation="SHA1"/>
    <!-- HttpModules for Common Functionality -->
    <httpModules>

Should  become :

<system.web>
    <machineKey
      validationKey="03444CC69DC39995DE1EAA99910FEAF4A6668B54"
      decryptionKey="9E555086888077A333EEFB5A77777D6651DDE06F6944BAC8"

      decryption="3DES"
      validation="SHA1" />
    <!-- HttpModules for Common Functionality -->
    <httpModules>

 

And finally, this section :

    <data
      defaultProvider="SqlDataProvider">
      <providers>
        <clear/>
        <add name="SqlDataProvider"
          type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider"
          connectionStringName="SiteSqlServer"
          upgradeConnectionString=""
          providerPath="~\Providers\DataProviders\SqlDataProvider\"
          objectQualifier=""
          databaseOwner="dbo"/>
      </providers>
    </data>

Should  become :

    <data
      defaultProvider="SqlDataProvider">
      <providers>
        <clear />
        <add name="SqlDataProvider"
          type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider"
          connectionStringName="SiteSqlServer"
          upgradeConnectionString=""
          providerPath="~\Providers\DataProviders\SqlDataProvider\"
          objectQualifier=""
          templateFile="DotNetNuke_template.mdf" databaseOwner="dbo" />
      </providers>
    </data>

 

3. Once you have modified the web.config file correctly, it should be uploaded into the root of your Dotnetnuke website.

 

Note that while some of the above configuration information for the web.config file may change as new versions are delivered by the Core Dotnetnuke Team, the above changes in blue are still required, as per version 4.5.3. 

Now you can proceed to the full upgrade process found in stage 3...

 





Amazon Recommended Textbooks...

DotNetNuke For Dummies (For Dummies (Computer/Tech))

DotNetNuke For Dummies (For Dummies (Computer/Tech))

List Price
$24.99

Our Price
$12.38

Beginning DotNetNuke Skinning and Design...

Beginning DotNetNuke Skinning and Design (Programmer to Programmer)

List Price
$39.99

Our Price
$13.90

Professional DotNetNuke 4: Open Source...

Professional DotNetNuke 4: Open Source Web Application Framework for ASP.NET 2.0 (Programmer to Programmer)

List Price
$39.99

Our Price
$7.10

Privacy Statement :: Terms Of Use
Copyright 1991-2008 by Genesis Engineering A.B.N. 73793186945