Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi

I tried to create a login page and when I tried to login by creating a user

I am getting the following error

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: The database 'C:\DATA\BEGASPNET\LESSON10VALENCIA\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.
Cannot open user default database. Login failed.
Login failed for user 'Dell1\Cool'.

My web config is


<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionstrings>
<add name="ApplicationServices" connectionstring="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true">
providerName="System.Data.SqlClient" />
<add name="ConnectionString" connectionstring="Data Source=.\SQLEXPRESS2008R2;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True">
providerName="System.Data.SqlClient" />

<system.web>
<compilation debug="false" targetframework="4.0">
<authentication mode="Forms">
<forms loginUrl="Login.aspx" timeout="2880" />

<membership>
<providers>
<clear>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionstringname="ApplicationServices">
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />


<profile>
<providers>
<clear>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionstringname="ApplicationServices" applicationname="/">


<rolemanager enabled="false">
<providers>
<clear>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionstringname="ApplicationServices" applicationname="/">
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationname="/">



<system.webserver>
<modules runallmanagedmodulesforallrequests="true">




Pl. help me
Posted
Comments
Sergey Alexandrovich Kryukov 20-Jun-12 19:07pm    
OK, the message instructs you to obtain a stack trace, with is very important. And where is the dump of your stack trace?
--SA

1 solution

SQL Server 2008 databases are version 655. SQL Server 2008 R2 databases are 661. You are trying to attach an 2008 R2 database (v. 661) to an 2008 instance and this is not supported. Once the database has been upgraded to an 2008 R2 version, it cannot be downgraded. You'll have to either upgrade your 2008 SP2 instance to R2, or you have to copy out the data in that database into an 2008 database (eg using the data migration wizard, or something equivalent).

The message is misleading, to say the least, it says 662 because SQL Server 2008 SP2 does support 662 as a database version, this is when 15000 partitions are enabled in the database, see Support for 15000 Partitions.docx[^]. Enabling the support bumps the DB version to 662, disabling it moves it back to 655. But SQL Server 2008 SP2 does not support 661 (the R2 version).
 
Share this answer
 
Comments
Mary Abraham 20-Jun-12 17:31pm    
How do you down load sql server 2008 sp2 pl. reply with the site.
VJ Reddy 20-Jun-12 22:37pm    
Good answer. 5!
John Bhatt 20-Jun-12 23:08pm    
This is Link for SQL Server 2008 SP2

http://download.microsoft.com/download/A/4/8/A480FCB4-4EC8-496A-BDA9-13E68FFADB03/SQLServer2008SP2-KB2285068-x86-ENU.exe
Sandeep Mewara 21-Jun-12 16:43pm    
My 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900