I have an SQL server 2016 instance running on Windows server 2016, I'm trying to connect to the DB from a remote PC in Visual Studio 2017 Community using the Server Explorer. The connection is successful and I can see the Databases available on the server and login just fine but when I try to expand the tables folder I get this error:
Failed to retrieve data for this request
Failed to connect to server (local)
Login Failed for user 'xxxxx'
The thing is I can connect just fine the same way using Visual Studio 2015 Enterprise means I can see the tables and alter them.
I made sure that the user had all the permissions granted on the server, And to me it doesn't seem to be a permission issue since the connection work just fine in VS 2015.
This would help. Make sure you check the "Save my password" checkbox when you add new database connection view picture.
Wow I kind of gave up on this and here comes a solution that is so simple but weirdly it did solve the problem I couldn't have guessed that something like this would cause this kind of error.
This was exactly it. I had to add
Persist Security Info=True;
to my connection string in web.configThis worked for me. I was confused at first because I didn't receive the error in SQL Server Management Studio but this fixed it on Visual Studio. +1 for sure
Thanks @kyaqb. Adding the 'Persist Security Info=True;' to my connection string worked.
Far out, spent a long time switching screens for this issue, good work!!