I have a problem that my asp.net mvc application somehow can't create a localdb .mdf file.
For example, I am creating a new web project in VS 2015 and debug it. When I go to register and enter some new user, the app throws an exception that the file cannot be found...
I know there are similar posts, but none of the solutions helped me.
My connection string looks like this:
<add name="DefaultConnection"
connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Documents\Visual Studio 2015\Projects\Auth1\Auth1\App_Data\aspnet-Auth1-20160121104112.mdf;Initial Catalog=aspnet-Auth1-20160121104112;Integrated Security=True"
providerName="System.Data.SqlClient" />
I already tried changing the keyword AttachDbFilename to
|DataDirectory|\aspnet-Auth1-20160121104112.mdf
I tried playing around with the Data Source.
I tried giving permission to the the SQL Server user to the folder...
I checked that VS, SQL Server 2014 and the Windows User are all using the same user.
I mean, how can a project from scratch already have a bug?