Problem in connecting to SQL Server 2005 Express

"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"
Ever encounter this error when you are trying to connect to SQL Server 2005 Express?

The reason is that by default the SQL Server has remote connections turned off or the SQL Server Browser is needed to establish a remote connection, which you have to enable it manually.

The solution is:
1. Go to All Programs > SQL Server 2005 > Microsoft SQL Server 2005 > Configuraton ToolsSurface Area Configuration Tool.
2. Click Surface Area Configuration for services and connection.
3. Go to SQLEXPRESS / Database Engine / Remote Connections at your left panel.
4. Make sure "Local & Remote Connections" is selected.
5. Select either TCP/IP, named pipes, or both.
6. Go to My Computer / Manage/ Services and restart the database engine (Sql Server SQLEXPRESS) service. 7. In the Surface Area Configuration Tool, click on the Service under SQL Server Browser, and set the Startup Type to Automatic and make sure the Service Status is Running.