Last post Feb 14, 2017 02:37 PM by bbcompent1
Jan 30, 2017 07:32 PM|RobertH3|LINK
I was unsure which forum to use for this.
I created a new web forms project
I copied my Sql Database to use in the new project
I create new users, but they don't register in the database under AspNetUsers DB
A new database was created, but when I try to access it, I get a version error.
It uses default connection, i am using a custom connection.
How can I get the Database to use the one I copied, or get access to the database created so i can copy my tables to it?
Jan 30, 2017 08:15 PM|bbcompent1|LINK
Hi Robert, what you need to do is open your web.config file which is in your application directory. Modify the connection string that is there to point at the correct SQL Database you are trying to use. If you get stuck, send me a private message and I can
help sort you out.
Jan 30, 2017 08:16 PM|march11|LINK
A version error in this case most likely relates to different versions of the database software installed. I take it you have two different hardware platforms.
If not what version of Visual Studio are you using? It is also possible that VS tried to create a localDb or default aspnet.mdf and connection strings are referring to a different version of SQL.
Describe the PC config, DB, and show the connection strings (hiding and passwords of course.)
You may also wish to look at the connection string info avaialbel here...
Jan 30, 2017 08:18 PM|bbcompent1|LINK
Another option on the books is using SQL Management Studio Generate Scripts function. On the old database, you right click the database, click Tasks > Generate Scripts. Make sure to export the schema and data option in the advanced settings. Here is a tech
article to help you do that:
Jan 30, 2017 10:04 PM|RobertH3|LINK
Ths shows the error message, I have ALWAYS had the DefaultConnection commented out, I used my connection after i copied my database to this new project from the old project, It was the same version. However when I used the default CreateUser or Register
Page using identity it created another database labeeld DefaultConnection and when I try to access it I get the error.
Jan 30, 2017 10:17 PM|RobertH3|LINK
I also think i created the web forms project, used nuget to update everything .net, identity... , then copied my db,
I guess I should have
Updated everything, then created a user which creates the database, then used my commands to update the database to install the tables and procedures?
Jan 31, 2017 03:11 AM|RobertH3|LINK
Since I am using VWD - they have eliminated some features i liked the most for database - namely the diagram and of course you cant create a whole databse script you have to do each table and procedure individually which takes days.
I have Sql server management studio 2008, but since I cant get it to connect to anything - I don't use it. It doesn't give you a dialogue to browse for a database on your computer, so either I don't know how to use it, or it just doesnt work properly.
Feb 01, 2017 05:43 PM|march11|LINK
We can't read your connection string, you can just copy that code from the file and past in a reply, we don't need the full screen shots.
Feb 01, 2017 06:03 PM|bbcompent1|LINK
Ok, upgrade your Sql Server 2012 to 2014. This is the version chart according to Microsoft (from
A database created by a more recent version of Microsoft SQL Server cannot be attached or restored to an earlier version. This restriction is there because an older version cannot know about file format changes that were introduced in the newer release.
If you attempt to attach a database to an earlier version, you will get SQL Server error
948 with the internal version numbers listed in the error message text.
The internal database versions for SQL Server aren't clearly documented in the Microsoft documentation.
Feb 01, 2017 07:04 PM|RobertH3|LINK
Since I am using VWD 2013, there is no way to get the database script, and the version of Management studio I have is 2008 and I can't even get it to find a database let alone connect, Is there an updated version of Visual Web Developer 2013? What I do right
now is have a copy of all of my table scripts in one text file, then i use a text file with all the relationships, then one with all the data, but i have to open and create each script then copy, takes a whole day or two
Feb 02, 2017 08:20 PM|bbcompent1|LINK
Still, upgrade the sql express installed on your machine and then you should be able to load/connect that database.
Feb 10, 2017 04:11 AM|RobertH3|LINK
OK - I have tried everything - I tried to download SMSS 2016 but all I got was an import export tool, I have tried to use SqlServer MS 2008, but I cant NAVIGATE to find a server - Do I need to put the database into a specific folder?
I used this page
I don't know what my server instance is
I don't know what my log-in is
all it says is <local> but says can't find anything - Why cant I navigate like the file folder system to find the database then try to connect to it?
VWD 2013 has no features.
Isn't there a simple fix to fix this problem - Why can't I use my existing database that has a connection to use identity and was created with identity to use my existing database instead of adding a connection that isnt even in my web.config file to begin
with? I don't have DefaultConnection.
Thanks for the help, but now I have to create a whole new Web Project - upgrade all add-ons - save my scripts table by table and procedure by procedure copy all my data, then all of my pages to a whole new site - Set me back a week or more. Why won't visual
Web Developer let me Create all scripts?or Database Diagrams? or Why wont SSMS let you navigate to a database in a file folder and connect to it - It asks me to register a local server - but what name do i give for this server to look for?
Feb 14, 2017 02:37 PM|bbcompent1|LINK
If memory serves me correctly, LOCAL is actually using a trusted connection. The actual connection is controlled in a different .config file located in C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config
The line you are looking for is:
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI; AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
Change the AttachDBFilename to the name of your DB. Just make sure to drop it in to the data folder under your web project.