We have two sample ASP.NET MVC web applications installed from internet both using SQL EXPRESS LocalDb. When we open one app in VS2015 we can access the LocalDb in the Server explorer of VS2015. But when we close the first app and open the second app in VS2015 and try to access LocalDb in the server explorer we get the following error:
Cannot open database "AspnetSampleVS2015-2-1-alpha1" requested by the login. The login failed. Login failed for user 'myDomain\domainUserName'. In web.config file the connection string for both the app are similar except for the db name. The connection string for the second app is:
Moreover, when in solution explorer we open the C:\Users\myUsername folder we can see some LocalDb .mdf and .ldf files but no LocalDb files for the above mentioned second LocalDb that leads us to believe that this LocalDb was not installed at all. But the error (shown above) does not indicate it. This sample was installed through NuGet.
I guess that the connection string has to include the name of .mdf file also. That may be the reason that it is not getting created for the second project. Also tell whether you created empty project or started with template. If possible share the connection string of first project also.