Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Server 2005 : TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.

Posted on 2010-08-17
10
Medium Priority
?
839 Views
Last Modified: 2012-05-10
Hi everyone,

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,

>Mixed Mode
>All services are running
>remote desktop firwall off.

0
Comment
Question by:developer2966
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 11

Expert Comment

by:asian_niceguy
ID: 33461936
If you manually create an ODBC connection using those credentials, can you connect? If not, make sure your server name/ and or database names are correct.
0
 

Author Comment

by:developer2966
ID: 33461974

Servername and database name are exactly same. and i tried manually but same error.
0
 
LVL 3

Expert Comment

by:mamalik00
ID: 33462034
Management Studio Connection which is working for you is local or remote ?

Are you connecting Management Studio from the same PC (using localhost) or Remote PC (using IP)?
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:developer2966
ID: 33462523

I found out the problem Client Mechine  enabled MacAfee firewall "on"
i turn off the MacAfee firewall its working fine.

Is it possible to work when MacAfee firewall on like "Windows execptions"?
0
 
LVL 14

Accepted Solution

by:
Dhanasekaran Sengodan earned 1500 total points
ID: 33462708
add IP ADDRESS and PORTNO to MacAfee firewall execption list

To follow this link

http://service.mcafee.com/FAQDocument.aspx?lc=1033&id=TS100406
0
 
LVL 14

Expert Comment

by:Dhanasekaran Sengodan
ID: 33462721
0
 
LVL 8

Expert Comment

by:Pramod Bugudai
ID: 33462929
Hi. My assumptions are:

1. While installing the the option for TCP/IP is not checked. or

2. You can allow the ip address of the local machine to the Remote machine by executing a query in the remote DB.
http://support.microsoft.com/kb/287932
0
 
LVL 8

Expert Comment

by:Pramod Bugudai
ID: 33462948
0
 

Author Comment

by:developer2966
ID: 33463342

My Problem Solved
Thanks to all.

0
 

Author Closing Comment

by:developer2966
ID: 33463413
Problem Solved
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question