SqlException - 'Login failed for user (user)'
-
Hello, I know this is a very common connectivity error but I am really stuck here. I am currently trying to access a DB via a BindingNaviagator control via .NET. I know the connection string is 100% correct as when I do the preview data on my TableAdapter the data comes through. When I go to fire the program and access these records, I get the SqlException - Login failed for user (user) error. Like I said I know this is a pretty general error, but any advice on where to continue looking would be greatly appreciated. Thanks In Advance -Nate Lindley- .NET Aficionado
-
Hello, I know this is a very common connectivity error but I am really stuck here. I am currently trying to access a DB via a BindingNaviagator control via .NET. I know the connection string is 100% correct as when I do the preview data on my TableAdapter the data comes through. When I go to fire the program and access these records, I get the SqlException - Login failed for user (user) error. Like I said I know this is a pretty general error, but any advice on where to continue looking would be greatly appreciated. Thanks In Advance -Nate Lindley- .NET Aficionado
That would suggest that the account the preview in Visual Studio is using is different to the account your application is using. This is possible if you are using a trusted connection as the account that will be used to access SQL Server will be the account of the currently running process. I suggest you find out what account your application is using and set up the appropriate permissions on SQL Server, or change the account your application is running in.
Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
That would suggest that the account the preview in Visual Studio is using is different to the account your application is using. This is possible if you are using a trusted connection as the account that will be used to access SQL Server will be the account of the currently running process. I suggest you find out what account your application is using and set up the appropriate permissions on SQL Server, or change the account your application is running in.
Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
I was thinking the same thing but I did the connection over and it still didnt work. I came to the conclusion that it was the DB settings not letting it connect because I actually created the DB on the server as opposed to the System Admin. So I had the SA make a new DB and it worked like a charm. I am not sure what settings were causing the remote connections to not be allowed but its all good now. Thanks for the response. Big Pimpin, Spendin Gs Nathan Lindley, .NET Aficionado