SQL Server An error has occurred while establishing a connection to the server

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Solution:
Go to
start > Programs > SQL server 2005 > Configuration Tools > SQL Server 2005 Surface Area Configuration.

Click on "Surfacr Area Configuration for Services and Connection"
Enable Remote Connection option

there we go