SQL Server 2000 Connection Error - Pre-Login Handshake?

10,751

Solution 1

I fixed this by opening up port 1433 (SQL) on the server firewall.

Solution 2

I had the same issue that you have. I solved this issue by allowing connections between the SQL client and SQL host in the firewall. And absolutely, you can grant port 1433 access, which is specifically used for SQL Server.

Share:
10,751
Unknown Coder
Author by

Unknown Coder

Updated on June 04, 2022

Comments

  • Unknown Coder
    Unknown Coder almost 2 years

    I am developing an ASP.NET application in VS 2010 with a SQL Server 2000 backend (I know, I know . . .)

    I have been working just fine with this setup for the greater part of the last 3 months. However, yesterday I did apply VS 2010 SP1 and now connecting to this database causes the following error:

    Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=72; handshake=44924

    Keep in mind that I have made NO changes to either the connection string or the SQL Server 2000 server/database. So there must be a reason why it's happening since the new additions.

    My connection items are fairly vanilla with

    conn.Open();
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = conn;
    cmd.CommandText = sqlStatement;
    SqlDataReader dr = cmd.ExecuteReader();
    resultData.Load(dr);
    dr.Close();
    conn.Close();
    

    And my connection string looks like

    Data Source=192.168.1.200;Persist Security Info=false;Initial Catalog=MyDB;User Id=MyUser;Password=MyPW;Timeout=45;
    

    You can see that I made changes to the timeout but this didn't work. But, again, I shouldn't have to make any changes. I just applied the VS 2010 SP 1 yesterday, that has been the only change. HELP!