SQL Server Configuration

mkooldude

New member
Joined
May 4, 2006
Messages
3
Location
New Zealand
Programming Experience
Beginner
Yo guys, hope all is going great. I am currently having a problem with the configuration of SQL Server on my home computer. At the moment, I am working on my University project which involves website development, I've got two databases, both of which have been created with SQL Server (it works fine) at my University, however at home, whenever, I try to test my solutions, an exception comes up stating the following:

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 just dont know how to configure SQL Server on my Home PC. Any suggestions would be really appreciated. Cheers.

mkooldude
 
It might be good idea to share how you are trying to connect (connectionstring, code, etc). This could be the result of a couple of things. Having that info will narrow it down.

-tg
 
I have another instance of SQL Server on my computer and the connection is being established through ASP.net pages. In addition, I am connecting to the databases using connection strings.
 
1) The SQL Server is on your local PC, right?
2) Is the SQL Server set to SQL Authentication or Mixed mode (SQL and Windows Authent)?
3) These ASP pages.... where are you running them from? Are they running on the same PC as the SQL Server or on a different one?
4) What does the connection string look like? Are you sure it is correct?

-tg
 
Yes, the SQL Server is on my local PC. The SQL Server is set to mixed mode plus the ASP.net pages are being run from my local PC (on the same computer in which I have SQL Server). Yep, I'm pretty sure the connection strings are correct because I am able to view the content of the databases within the VS 2005 IDE. However the following are the connection strings that I have used to connect to the two databases (Project.mdf and ASPNETDB.MDF):

Data Source=your-fk3wzjtn19;AttachDbFilename="C:\Documents and Settings\Owner\Desktop\RSS\App_Data\Project.mdf";Integrated Security=True;Connection Reset=True

Data Source=your-fk3wzjtn19;AttachDbFilename="C:\Documents and Settings\Owner\Desktop\RSS\App_Data\Project.mdf";Integrated Security=True;Connection Reset=True

Hope the format of the above connection strings are correct (I think they are). Cheers mate.

mkooldude
 
Ok.... now that gives me something to look at.... Look in the SQL Server, under security or management or something and find the place where it lists the logins and users that have access. .... Make sure your IISUSer (or IUSER, or ASPUSER, I forget the actual name) is listed as a valid Windows Authen Login.... and then make sure that login has the appropriate privs granted to the database... oh, wait a minute.... you're using a user instance of the db....can ASP do that?

-tg
 
Back
Top