I have the below query in my console appliaction
SqlConnection myConnection = new SqlConnection("user id=abc;" +
"password=xyz;server=test;" +
"Trusted_Connection=yes;" +
"database=tested123; " +
"connection timeout=30");
myConnection.Open();
When I run the above application, it is working fine .But when publish this, it is throwing an error for the other users who are not having access to this DB .To avoid this I have created one service account "abc" and added it to the required DB.But it is still failing with the below error .
System.Data.SqlClient.SqlException (0x80131904): Cannot open database "tested123" requested by the login. The login failed.
Login failed for user >> user who is running this app.
How to run EXE with some custom account for all the users ?