Posted on 2006-03-27
Medium Priority
Last Modified: 2008-02-01
Hi There

I have a asp web site that accesses some .Net Components.

When I try and access a component that uses a data connection I get the following error

.Net SqlClient Data Provider (0x80131904)
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

I have resently update my .net Framework to 2.1

Can this have something to do with it

Question by:Stanton_Roux
  • 2
  • 2

Expert Comment

ID: 16298906

maybe the update really causes the problem. I am not sure what gets updated actually.
But here are a few points I would suggest checking...

the message states that the target refuses the connection, so:

(1) are running any firewall (hard / or software) that causes the problem?
(2) are you in a domain and have no rights to access the server?
(3) most probable: the component you are using runs in IIS, therefore probably got the User context of "ASP.NET user". this user is normally installed as local machine user and therefore has no rights to access a server on  a different IP.
To solve this, you could either impersonate the component (like you are doing with your connections) or create a instance of the component in your security context.



Author Comment

ID: 16298949
1)I am running zone alarm personal firewall.

2)The SQL server i am trying to access is on the machine that I am working on.

3)I am accessing the site through through localhost so the asp.net user account should have rights.

Author Comment

ID: 16299053
I just checked in my User Acounts section and I see that the ASP.Net user account is not there

Is there a way of adding that account

Accepted Solution

IT-Schubertz earned 2000 total points
ID: 16299420
1)I am running zone alarm personal firewall

ok, any blocking messages on that log?

2)The SQL server i am trying to access is on the machine that I am working on

still could be that ZA locks that

3) not sure if adding this user is enough.
however, you can try it.
UserName: ASPNET
Pwd expires: never

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

621 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