Skip to content
Advertisement

Could not connect to the database Network error IOException: Connection refused: connect

I am running a SQL Server Express 10.50.4000.0 on my machine. I have enabled on the TCP/IP and made sure the port is set to 1433. I have added an exception in my firewall for 1433. The server service is running. I have tried localhost and the computer name and both give the same error. When i try localhostSQLEXPRESS or [USER-PC]SQLEXPRESS I received an error saying it could not find the database.

JavaScript

I receive the error:

JavaScript

with no additional context to investigate.

Advertisement

Answer

Your connection string needs to be in this format. Found here: http://msdn.microsoft.com/en-us/library/ms378428(v=sql.110).aspx

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement