Gga
Gga

Reputation: 4421

SQL Server 2008 on localhost: Connection continually refused

The problem I am having is that I keep receiving the

(provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

error every time I try to connect to the database.

I can see the database in SQL Server Manager Studio and have created a login for it by right clicking the security folder->new->login and entering a username and password with SQL Server authentication. I can also see the SQLSERVER (SQLSERVERDB) process running in the services window.

The connection string in my Web.config file is

  <connectionStrings>
     <add name="MainConnString" connectionString="Data Source=MEETING-ROOM\SQLSERVERDB,48006;Initial Catalog=Palace_Live;
          User ID=Palace_Live;Password=p@l@c310!;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />
  </connectionStrings>

I know the issue relates to the connection string as if I change the Data Source parameter to say Googl.com I receive a different error message.

I can't see what steps I have missed or what I am doing wrong. Could anyone help point me in the right direction as to what I might be missing

I am using IIS7 and SQL Server 2008 locally on a windows 7 32bit machine.

Upvotes: 2

Views: 1469

Answers (4)

mjjjj2001
mjjjj2001

Reputation: 41

i know the question, the problem is not appear on database, is the IIS7.0. there is a service account ,you need change it network in pool. my english not good,if you also can't slove,please send me email:[email protected]

Upvotes: 0

marc_s
marc_s

Reputation: 754993

Why are you specifying port 48006?? Is that a change you've made knowing what you're doing?? The default SQL Server port would be 1433.

If you try to just leave out the non-standard port - does that work for you??

Server=MEETING-ROOM\SQLSERVERDB;database=Palace_Live;User ID=Palace_Live;Password=p@l@c310!;MultipleActiveResultSets=True;

Upvotes: 2

Peter Campbell
Peter Campbell

Reputation: 671

As well as creating a Login to SQL Server have you added a User to the database(s) you want to access? This is usually done automatically when you create the Login when you give it access to specified databases, but can be done manually after the fact.

Upvotes: 2

Darren
Darren

Reputation: 70748

Try pinging: MEETING-ROOM\SQLSERVERDB

And if it gives you a response use the IP Address directly, also ensure that the Server does not have a firewall rule blocking incoming traffic on Port 48006.

Also ensure SQL Server is allowing Windows Authentication and SQL Server authentication. This can be done by right clicking on the database in Management Studio and going to properties and Security.

Upvotes: 1

Related Questions