Hi , I have a windows 2008 r2 x64 enterprise edition + sql server 2008 r2 datacenter edition from its local computer I can make connection to the sql server with sqlClient in C# and here is my connection string looks like :
using (sqlconnection cn = new sqlconnection("Data Source=myServerIPAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;"))
{
cn.open(); //I'll get error here from remote
using (sqlcommand cmd = new sqlcommand("sql",cn))
{
//some code here
}
}
but with exact above code from a remote computer I'll get this error :
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
but when I change above code to oledb everything works fine. respectively the connection string for oledb gonna change and this is my oledb connection string :
Provider=SQLOLEDB;Data Source=myserverIP;Password=password;User ID=sa;Initial Catalog=catalog
note : I've tried this http://www.connectionstrings.com/sql-server-2008 also but no difference