asp.net - Login failed for LocalDb -
we have 2 sample asp.net mvc web applications installed internet both using sql express localdb. when open 1 app in vs2015 can access localdb in server explorer of vs2015. when close first app , open second app in vs2015 , try access localdb in server explorer following error: cannot open database "aspnetsamplevs2015-2-1-alpha1" requested login. login failed. login failed user 'mydomain\domainusername'. in web.config file connection string both app similar except db name. connection string second app is:
<add name="defaultconnection" connectionstring="data source=(localdb)\v11.0;initial catalog=aspnetsamplevs2015-2-1-alpha1;integrated security=sspi" providername="system.data.sqlclient" /> moreover, when in solution explorer open c:\users\myusername folder can see localdb .mdf , .ldf files no localdb files above mentioned second localdb leads believe localdb not installed @ all. error (shown above) not indicate it. sample installed through nuget.
i guess connection string has include name of .mdf file also. may reason not getting created second project. tell whether created empty project or started template. if possible share connection string of first project also.
Comments
Post a Comment