hello every body
i did an application with c# to connect to sql server and it worked well on my local machine (to connect to my sql server 2005 on my computer),
but now i want to connect to a remote sql server 2005 which is on another computer, but it failed to connect through the application and even the my sql server management studio express 2005 and i failed to connect through visual studio 2008 servers part.
oh i went banana, i did all what i found in all posts i read.
-i made sure that the firewall give authority to my application & sql server to connect without blocking,
-added the port to the firewall
-added the /sqlexpress to server string
-added /sqlexpress,port no to the server string
-used the connection string the provider gave it to me it’s likeSqlConnection (.NET):
Data Source=db_name.db.6236289.hostedresource.com; Initial Catalog=db_name; User ID=user_id; Password=’your password’;
But also it is useless
-quite sure that my sql server tcp/ip and named pipeare enabled.
oh nooo, i don’t know what can i do???? please any one help me.
hint : the only way allowed me to connect to that sql server was the “database publishing wizard” when i tried to script my local db and to put it on the remote server, it worked well and created the tables on the remote server,
But when i tried to make the oppsite (to script the db that is remotely it failed and i get the same error)
Error details:
“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 – No such host is known.) (.Net SqlClient Data Provider)”
------------
there is something i made now to try
i made a web page connect to that sql server with the same connection string and it worked when i uploaded to my website,
But
locally it doesn’t work, may be that means that the problem in my computer especially that my sql management studio couldn’t connect also to that remote server?!!!,
HINT : my application is a “windows forms application”
please please help me, it’s urgently.