4

I have been learning ASP.NET and building a little customer portal. I used the built in CreateUserWizard. I wanted to look inside the ASPNETDB.MDF file to see how it was storing the users and maybe add some rows of my own. I opened the file in SQL Server Management Studio and viewed the file. I closed it with out saving.

Now when I try to run the program I get this new error:

The database 'C:\PROJECTS\PORTAL\PORTAL\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 706. This server supports version 662 and earlier. A downgrade path is not supported.

So I assume opening the project in SQL Server it upgraded the version to 706, How can I either delete this database and create a new one or change the version of the database to an support version.

Thanks

2 Answers 2

2

The following blog entry will help you

http://conceptdev.blogspot.com/2009/04/mdf-cannot-be-opened-because-it-is.html

Sign up to request clarification or add additional context in comments.

2 Comments

I tried that and still was getting the error. Is there a way I can just delete this database and create a new one?
I would recommend that you take a backup of current DB and then drop it. after that use Aspnet_regsql.exe tool to recreate the DB. msdn.microsoft.com/en-us/library/ms229862(v=VS.100).aspx
1

As soon as you attached it to SQL Server 2012, the database was upgraded to version 706. As the error message suggests, there is no way to downgrade the file back to version 662 (SQL Server 2008 R2).

You can run the script found in your Visual Studio folder -

[drive:]\%windir%\Microsoft.NET\Framework\version\asp_regsql. 

It'll display a UI for you to select the server to install a new copy on. Here's a MSDN article about it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.