0

I created a db via app-data folder, migrated over to server explorer and tried to connect to it and I get

Cannot open database "abc" requested by the login. The login failed. Login failed for user 'xyz'. I came across this: [Cannot open database “test” requested by the login. The login failed. Login failed for user 'xyz\ASPNET'

I have two questions concerning the best answer.

Whenever I connect to ssms windows authentication is selected. So does windows authentication still matter if a db is created using visual studio?

Second is concerning this:

UPDATE: Ok, you're using integrated Windows authentication --> you need to create a SQL Server login for "xyz\ASPNET" on your SQL Server"

What does he mean by create a sql login for user "xyz"?

I thought the purpose of win authentication was so you didnt have to type login and pass to connect. You're automatically connected through windows. Right?

TheGameiswar
  • 27,855
  • 8
  • 56
  • 94
Neltharion
  • 11
  • 2
  • *Have* you given permissions to that user in the first place? You can't connect if the user isn't allowed to connect to the database. – Panagiotis Kanavos Apr 07 '17 at 09:04
  • `xyz\ASPNET` looks like an application pool's local account, which means that `xyz` is a *machine* name. Local accounts can't connect to remote databases or remote file shares becomes the *remote* computer knows nothing about them. If SQL Server runs on a separate machine, you'd have to use a domain account for your application pool – Panagiotis Kanavos Apr 07 '17 at 09:06

0 Answers0