The database version '' does not match the project version '7.0', please check your connection strin

G D asked on February 3, 2016 05:39

Hello All, I am attempting to test a web application currently running in IIS7,and SQL 2008 standard and migrate it to Microsoft Azure Web App and SQL Azure.

I have got the site uploaded and using SQL Server Management Studio used the Migrate to SQL Azure task for the database. However once complete I receive message from kentico indicating "The database version '' does not match the project version '7.0', please check your connection string. "

Im not sure what this means and how to resolve it, Any suggestions?

Kentico 7.0.76 SQL 2008 -> SQL Server 2014 -> V12 Azure DB

Note: I had to migrate it to a server 2014 DB to get the Azure Migration tools

Recent Answers


Brenden Kehren answered on February 3, 2016 06:17

Run this query against the database and take a look and see what you're database says the version is.

SELECT *
FROM CMS_SettingsKey
WHERE KeyName = 'CMSDataVersion' OR
KeyName = 'CMSDBVersion' OR
KeyName = 'CMSHotfixVersion'

Secondly, you can check the version of your Kentico DLLs simply by going to the /Bin directory, right clicking on the CMS.CMSHelpers.dll and looking at the build version on the Details tab. Check to see the major version is at least the same as the major versions in the results of the query. My guess is they are not.

If it's the same, check the hotfix version. You can check in the file system to get this info to compare with the query. You can find the hotfix in /App_Data/Install/hotfix.txt.

There are a few things that could have happened:

  • Wrong files were uploaded to Azure
  • Your site is connecting to the wrong database
  • Your site's dlls were not copied correctly or at all

These are just a few things I can think of off the top of my head that might have happened. Check what I've stated above and report back if you will.

Brenden

1 votesVote for this answer Mark as a Correct answer

Martin Hejtmanek answered on February 3, 2016 07:43

Make sure you don't just hack the values in those keys, if your database structure doesn't match the version of DLLs, your data could get broken.

1 votesVote for this answer Mark as a Correct answer

G D answered on February 3, 2016 21:06

Hello Thanks for your help,

DB Query KeyName Key Value CMSDataVersion 7.0 CMSDBVersion 7.0 CMSHotfixVersion 76

DLL File Version 7.0.5165.22617

hotfix.txt 76

It seems like they match, I will look to re-upload the website files just incase something went wrong in the upload process

The application could not connect to the database, please check the connection string in the web.config file and SQL server availability.

Original error:

The database version '' does not match the project version '7.0', please check your connection string. 
0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 4, 2016 04:53

So insure your connection to the db is getting through then. Seems this might be the problem if you're attempting to connect remotely.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.