Can't Access Host Settings After Upgrading to DotNetNuke 7.2.0
After upgrading to DotNetNuke 7.2.0 you try and access the Host Settings page on your site and get the following error:
Error: Host Settings is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Invalid length for a Base-64 char array or string. ---> System.FormatException: Invalid length for a Base-64 char array or string. at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at DotNetNuke.Security.FIPSCompliant.DecryptAES(String encryptedText, String passPhrase, String salt, Int32 iterations) at DotNetNuke.Modules.Admin.Host.HostSettings.BindSmtpServer() at DotNetNuke.Modules.Admin.Host.HostSettings.BindData() at DotNetNuke.Modules.Admin.Host.HostSettings.OnLoad(EventArgs e) --- End of inner exception stack trace ---
DotNetNuke has now started encrypting all passwords in the database, including the SMTP account password. While upgrading to DNN 7.2.0 the SMTP password was not encrypted, but while attempting to load the Host Settings page it is looking for an encrypted password. As the existing password is not encrypted it is "invalid".
The SMTP Account password will need to be removed from the DotNetNuke database manually, and then re-added through DotNetNuke to encrypt it correctly. The steps below provide instructions on performing this task.
It is recommended that you take a backup of your site through the Control Panel before making any changes directly to your database. Instructions on backing up your database can be found in our How to Back Up Your Website Using Plesk article
- Connect to your database using MSSQL Management Studio. If you are unsure of how to do this please see our article on How To Connect to Your MS SQL 2012 Database.
- Expand Databases > [your database name]> Tables.
- Right click on the dbo.HostSettings table and then the Edit Top 200 Rows option.
- Once the contents of the table loads locate the SMTPPassword option in the SettingName column.
- Delete the contents of the SettingValue cell which is your current SMTP Password next to the SMTPPassword cell and click out of that cell to save the changes.
- Recycle your sites application pool. You may follow our How to Recycle the Application Pool of a Website if you need assistance with this.
- Log in to your DotNetNuke website as Host.
- Navigate to Host > Host Settings > Advanced Settings > SMTP Server Settings.
- Re-enter the password for the SMTP account in the SMTP Password field.
- Click Update at the bottom of the page.
Once the password has been updated in DotNetNuke it will encrypt it to make it valid.