You have install a SQL Server 2008 CTP and then another application or you've installed SQL Server 2008 without reading the readme file.

You try to use SQL Server Management Studio to connect to your server and you get this error: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

You try to connect using the TCP/IP protocol instead of Shared Memory and the result is another error:  A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (Microsoft SQL Server, Error: 10054)

In the event viewer you may see this error message:The Tabular Data Stream (TDS) version 0x73090003 of the client library used to open the connection is unsupported or unknown. The connection has been closed. [CLIENT: ]

SQLCMD connects to the server so the server is ok, then the network library is the problem and more specifically the SqlClient. How to detect exactly what caused the problem? See the next table (source):

Conectivity Matrix Table

[edit date="2007-12-19"]

A better image is provided by this article: Connecting to Pre-Release Versions of SQL Server 2008

[/edit]