1

I just moved from Visual Studio Web Express to professional. (2010)

I have a web application were the log-on database was linked to SQL Server Express, but my new installation does not have SQL Server Express? What I have now is SQL Server 2008 R2.

I'm now getting this error trying to log-on to the website :

ASPNETDB.MDF cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported.

I see in my web.config there is a connections to SQL Server Express.

<add name="ApplicationServices" 
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
     providerName="System.Data.SqlClient" />

I'm pretty sure here lies my problem, I'm just not sure how I can go about fixing this. Can I import this data into SQL Server 2008 R2 and then re-point the connections string to that?

any help would be great.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mike
  • 1,221
  • 3
  • 15
  • 34
  • This is because they are two different database engines with regards to the .DLL's There is a work around this .. problem is I can't remember how I corrected that issue 6 months ago.. I believe that I had to open the Database using VS2005 and export the data in to my R2 environment – MethodMan Dec 23 '11 at 18:32
  • Hi DJ thanks, both SQL-Express and the server are the same version, I'll just keep looking. – Mike Dec 23 '11 at 18:35
  • is it possible to also change your connection string to use Trusted Connection just curious and get rid of the SSPI Integrated Security – MethodMan Dec 23 '11 at 18:35
  • Same version then there may be a difference in how you are connecting.. what connection string are you using for SQL Server R2 instance..? – MethodMan Dec 23 '11 at 18:36
  • here it is: – Mike Dec 23 '11 at 18:40
  • 1
    http://stackoverflow.com/questions/2462919/mdf-is-too-new-661-my-database-supports-version-655 – benni_mac_b Dec 23 '11 at 18:41
  • try using what I have without the password.. also you shouldn't have to specify the providername put that in the using instead using System.Data.SqlClient; – MethodMan Dec 23 '11 at 18:42

3 Answers3

0

change your SQL Server string to match what I have and try it

<add key="strConnectionString" value="Data Source=S1\SQL80VS1;Initial Catalog=SPS;User ID=yourSqlAccountUser;Trusted_Connection=yes"/>

change the DataSource= to match your DataSource.. let me know what happens

MethodMan
  • 18,625
  • 6
  • 34
  • 52
0

The problem is that you are trying to open an older version of the database file in a newer version of SQL Server. You should attach the database to the SQL Server instance using the SQL Server Management Studio, which will upgrade the database to the correct version.

competent_tech
  • 44,465
  • 11
  • 90
  • 113
  • is correct that's what I had to do I couldd't remember however I am just trying to help him get his connection string formatted correctly as well along with helping to resolve the database error He has to keep in mind that SQL SErver Express and Sql Server 2008 are not the same.. – MethodMan Dec 23 '11 at 19:01
  • Okay guys thank you all, what I did was delete the database and forces it to be recreated. – Mike Dec 27 '11 at 12:49
0
<add name="ApplicationServices" connectionString="Data Source=xxx.xx.xxx.xxx;Initial Catalog=AWFE;User ID=xx;Trusted_Connection=yes" />
MethodMan
  • 18,625
  • 6
  • 34
  • 52