SQL Server 2005 : TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.
Posted on 2010-08-17
Please solve my problem,
When i connect remote desktop database using via SQL SERVER 2005 Management Studio,its working
But,when i connect via c# application its not working and the following error message displays:
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 connection could be made because the target machine actively refused it.)
i am used following connnetion strings :
1) Data Source=IP_ADDRESS,3640\SQLEXPRESS;Initial Catalog=DB;Persist Security Info=True;User ID=sa;Password=XXXXX
2) Server=IP_ADDRESS; Database=DB; User ID=scbeacab1003; Password=XXXXX
3) Data Source=IP_ADDRESS,3640;Network Library=DBMSSOCN;Initial Catalog=DB;User ID=sa;Password=XXXXX
I checked all Steps,
>All services are running
>remote desktop firwall off.