Last post May 02, 2017 07:22 AM by AngelinaJolie
May 01, 2017 02:57 PM|starter88|LINK
I use ASP.net Identity with my MVC 5 application.
In web.config i have connection string.
If I try register first user, identity ignore a connection string and create new database in localdb with "defaultconnection" name.
I set connectionstring like this
: base("myconnectionstring", throwIfV1Schema: false)
How i can fix this error?
May 01, 2017 03:27 PM|bbcompent1|LINK
It may very well be the machine configuration file in the .NET folder in the server/development machine that is overriding your setting. Take a read through this forum posting for more details and how you can possibly fix it:
May 02, 2017 07:22 AM|AngelinaJolie|LINK
I suggest that you could change the name: DefaultConnection to name: myconnectionstring directly to fix it ,just like code below;
<add name="myconnectionstring" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-TestMVC-20170303055930.mdf;Initial Catalog=aspnet-TestMVC-20170303055930;Integrated Security=True" providerName="System.Data.SqlClient" />