I am facing some issues with connectivity . Question-
1)Is it possible that Web application access the databse but not console application?
2)When I am connecting my console app to our databse on server-"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible
",this error is coming though when I test the connection using setting tab in VS2010 for console application,it says Connection succeed,but as soon as i write Con.open,I get the error mentioned.
3)Also,If i am not able to connect to my db with new application,how come previous build web application on production are working fine.?
NOTE-There has been massive change in Server-Sql instances and all servers were upgraded.
Do I make sense?
Code I am using-
SqlConnection con;
SqlDataReader reader;
try
{
int id;
con = new SqlConnection("Data Source=DAN\\C1;Initial Catalog=tablenames;User ID=user;Password=123");
con.Open();//Error comes here
Exact same connection string works for webapplication but not for Console.Is it have something to do with sql server upgarde and changes.
Any help or guidance?