DotNetNuke: NullPointerException when trying to upgrade from DNN Professional 7.2.0 to 7.2.1 in web farm environment


Recently, I tried to upgrade a DNN Professional environment which is hosted on a web farm (2 web servers) from DNN 7.2.0 to the most recent version 7.2.1 and the upgrade wizard (/install/install.aspx?mode=upgrade) showed the following NullReferenceException error in the middle of the upgrade process:

Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at DotNetNuke.Common.Utilities.UrlUtils.EncryptParameter(String value, String encryptionKey)
at DotNetNuke.Professional.Providers.CachingProviders.WebRequestCachingProvider.WebRequestCachingProvider.SendMessage(String message, String data)
at DotNetNuke.Common.Utilities.DataCache.ClearCache()
at DotNetNuke.Services.Upgrade.Upgrade.UpgradeDNN(String providerPath, Version dataBaseVersion)
at DotNetNuke.Services.Install.Install.UpgradeApplication()
at DotNetNuke.Services.Install.Install.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Fortunately, I created a file and database backup before starting the upgrade process and was able to revert the environment to the old state. Since the the upgrade in the test environment (which is not hosted in a web farm) went smoothly and the WebRequestCachingProvider.SendMessage method was involved in the stack trace of the NullReferenceException it seems to be a web farm related problem.

Finally I was able to upgrade to 7.2.1 by deactivating the DotNetNuke web farm features (like cache sync) before and activating it again after the upgrade process with the following SQL commands:

-- Deactivate web servers
UPDATE [dbo].[WebServers] SET [Enabled] = 0;

-- Activate web servers
UPDATE [dbo].[WebServers] SET [Enabled] = 1;

Leave a Reply

Your email address will not be published. Required fields are marked *