So this is what I have:
- Wordpress website hosted on a shared server X with the usual DB for the Wordpress instalation and a second DB with a table containing costumers
- Asp.net MVC app hosted on server Y that I need to connect to the costumer table to get all the costumers
I have search in SO and I come up with this in for the controller on the MVC app:
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Data Source=**ip-address-of-server-x**/costumers" +
"User Instance=true;" +
"User Id=**user**" +
"Password=**pass**" +
"AttachDbFilename=|DataDirectory|Database1.mdf;";
conn.Open();
I'm getting "Server not found". I am not sure I can access the DB this way or maybe the problem is in the format of the Data Source string.