Una conexión existente fue cerrada por la fuerza por el host remoto

I am getting the below error from .net application code. I am using VS2008 with MS SQLServer Express 2005.

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.) (.Net SqlClient Data Provider)

I have read the blogs and similar queries around the earlier error which was, 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)

Following the instruction on these blogs I have now configures the server for remote connectivity with TCP/IP and Named Pipes. The order are also like TCP/IP first and then Named Pipes.

On windows firewall I have configured exception for SQL Port to be allowed on 1433 and sqlbrowser.exe to be allowed as well.

Now I am getting the ".. existing connection was forcibly closed by the remote host. error.

Please suggest any help as I have to fix this application deployment on priority.

The connection string used is,

preguntado el 23 de septiembre de 12 a las 13:09

You should show the code that try to connect to your database backend and the connection string used.... -

may be auth failure or server may be listening on a different port -

Turn firewall off on both and test to know you are dealing with a SQL problem. Make sure the user has authority on the database (not just server). -

2 Respuestas

I can make this happen on SQL Server 2008 by trying to insert a record with a "datetime not null" column set to C#'s DateTime.MinValue using the SqlDb interface.

@TestDate0=1/1/0001

Se ha producido un error de nivel de transporte al enviar la solicitud al servidor. (proveedor: Proveedor de TCP, error: 0: el host remoto cerró a la fuerza una conexión existente).

Odd message for this case for sure!

Respondido el 30 de Septiembre de 13 a las 22:09

Please try to extend the connection retain time, default should be 30 seconds. After connection is timeout and closed, if you want to perform some action on the closed connection, you will see this error.

respondido 06 mar '13, 19:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.