Reputation: 425
I need to connect another db available in another system using windows authentication. But it works when I connect through sql client. not through code.
connection string has Integrated Security=SSPI;
but I still get login failed for VM-MBWEBDEV
any idea?
Upvotes: 0
Views: 99
Reputation: 2075
It sounds like the account your are impersonating does not have permission to access SQL server on a different machine.
You need to make sure that the asp.net worker account has rights to access sql. Otherwise, instead of using SSPI, pass username and password.
Upvotes: 1