jeudi 15 janvier 2015

sql server 2005 connection open error - An existing connection was forcibly closed by the remote host

I am getting following error when trying to open a connection to SQL Server 2005. I am using .Net SqlConnection class and the error is thrown when open() is called. My code runs properly from local machine but throws error from the our test server. The test server is running IIS 6.0.


Error:


System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Portal.Data.SqlDataAccess..ctor(String ConString) in...


The connection string I am using is


Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbname;Data Source=servername;Packet Size=4096" providerName="System.Data.SqlClient"


Thanks


Aucun commentaire:

Enregistrer un commentaire