ASPNET application with SQL Server 2008 R2 RRS feed

  • Question

  • Hello,

        I don't know If I am doing something wrong, but all I am trying to do is to setup a .net web application.

        I have a fresh install of windows 7 64 bit, I installed IIS and then visual studio 2008 express and I had included in the installation Microsoft SQL server express. My web application was running fine (using db connections), but my problem was that I couldn't connect to the database with another way other than the web application. I noticed that I was missing the Microsoft SQL Server 2008 Management studio express which did not come with the visual studio installation. I tried to download it from Microsoft downloads as a separate download and install it but the installation would fail. It would try to install SQL server as well instead of just installing the studio that I needed and it would complain for missing files. Since I was having all those problems, I decided to completely uninstall SQL server and download the R2 version.
        Unfortunately the uninstall would fail so I decided to do an upgrade of SQL Server 2008 R2. After that I had about 13 different programs of SQL Server in my control panel/Programs and features. My aspnet application was not functional any more so I decided to uninstall Microsoft SQL Server 2008 R2 and start over. This time it was much worse, the uninstallation of SQL Server 2008 R2 would be successful (about 10 mins uninstall process removing files/registry entries etc) but SQL server was still installed and all the 13 programs in my control panel were still there. I tried to uninstall it again, it would go through the same process again (a bit quicker than 10 mins this time) and everything would still be installed. I tried to reboot and do it again, and same problem. I had managed to successfully repeat the uninstall process 5 times with SQL Server still being there. In that case, I had to really start over, reinstall a fresh copy of windows.
        This time, I decided to be a lot more effective and find the root of the problem. I installed 2 fresh copies of windows 7 on 2 different machines, on one installed IIS and Visual Studio 2008 SP1 and on the other I installed IIS and Microsoft SQL Server 2008 R2 the one that comes with the Management Studio. My web application was finally successfully running on the Visual Studio 2008 SP1 and It wouldn't run on the R2 version. So I decided to compare the SQL servers and find out the problem. I have noticed that the version that came with Visual Studio 2008 SP1 was 10.50.1600.22 and the R2 that I had download from http://www.microsoft.com/express/Database/ was 10.50.1600.1. Since I had a working version on Visual Studio 2008 SP1 I decided to download again the Studio Management 2008 R2 as an independent package and install it. This time the install was successful but again it installed the version 10.50.1600.1 instead of .22 that I had the server. I connected to studio and I tried to attach my database. Again I was surprised, I've got an error message saying: The database 'F:\www\myproject\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported. (Microsoft SQL Server, Error: 948). I was very dissapointed since my version was so close but not good enough but at least now the message was clear so I decided to do some updates in order to solve the problem. I noticed that there was an option package 260MB to update to Microsoft SQL Server 2008 SP1 so I did download it and install it. I was very dissapointed to see that after this update, instead of having a new version of Management Studio, I've got a downgraded version of SQL Server. Now my server was 10.1.2531.0. (It used to be 10.50.1600.22 before). Well I didn't quit, I noticed that there was a SP2 available (KB2285068) of another 285MB. (Now this SQL server has exceeded 1GB in downloads considering that my bandwith is limited) so I downloaded and installed that as well. Now I have noticed that the SQL Server version became 10.2.4000.0. Now I was not even sure if this version was higher than 10.50.1600.22 or not since it got a bit more confusing. I checked my aspnet web application and it was still working. Now I tried to use SQL Management studio 2008 R2 which was still in version 10.50.1600.1 and attach a copy of database (since my web application mdf was already in use, I had to use a copy of my mdf database). This time the message was similar than before, but even more ironic. It was saying: The database 'F:\www\myproject\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 661. This server supports version 662 and earlier. A downgrade path is not supported. (Microsoft SQL Server, Error: 948). I was not sure if this was a joke or not. At my first look I thought that I was one version behind but then I looked better and I noticed that I was one version above. Since it supports 662 and earlier, 661 is earlier than 662.

    I put a lot of effort to make this work but I have no idea what I am doing wrong. I tried to describe all my steps in details so if someone could give me some guidelines of what I am doing wrong, or how I could make this work, would be really appreciated.

    Kind Regards,

    Tuesday, February 8, 2011 11:00 PM