Error connecting to SQL Server 2000 database using System.Data.SqlClient.SqlConnection after upgrading to .NET Framework 4.5 RRS feed

  • Question

  • After upgrading from .NET Framework 4 to 4.5, my application is no longer able to connect to SQL Server 2000 databases using a System.Data.SqlClient.SqlConnection object.  The error I receive when trying to connect is:


    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=25; handshake=14974;


    I am still able to connect to SQL Server 2005 and later databases after the .NET 4.5 upgrade.  Prior to the upgrade, I could connect to SQL Server 2000 databases.  I am assuming that SQL Server 2000 connections are no longer supported in the System.Data.SqlClient.SqlConnection class as of .NET 4.5.  Could someone please verify that this is indeed the case or is there something I can do in my connection string or somewhere else to allow me to connect to a SQL Server 2000 database using .NET 4.5?


    Monday, November 12, 2012 7:29 PM

All replies

  • Hi Nth78,

    Welcome to the MSDN Forum.

    I haven't found the document which declaim that 4.5 doesn't support sql server 2000.

    Did you build the application on the same machine? Now, when you target to 4.0, it works well?

    How about set a long connect time?

    And this blog may help: 

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, November 13, 2012 12:41 PM
  • Mike,

    Thanks for the reply.  The application targets 4.0 but if the client has the 4.5 client installed I get the error.

    The application is being built on the same machine.  I increased the timeout to 60 seconds and still got the error.

    Tuesday, November 13, 2012 3:35 PM
  • Hi Nth78,

    If so, this should be a .net 4.5 compatibility issue, so

    please contact it by this mail ID:

    Could you email us at netfx45compat at Microsoft dot com with following information.

      • Code that reproduces the problem.
      • Operating System

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, November 14, 2012 9:14 AM
  • Did you find a fix for this? I installed VS 2012 and am having the same issue. I uninstalled 4.5 randotNetFx40_Full_setup.exe  and the program works. I re-installed 4.5 and the problem returns. 
    Monday, January 28, 2013 8:28 PM
  • Unfortunately ,no.  I was able to work around it by checking to see if the user was running .net 4.5 and connected to a SQL Server 2000 database.  If so, I used an ODBCConnection object instead of a SQLConnection object.  It was a pain but it worked.
    • Proposed as answer by Riquel I'm Wednesday, June 5, 2013 7:19 PM
    Monday, January 28, 2013 10:31 PM
  • So just try ODBC.

    Call me ghost for short, Thanks
    To get the better answer, it should be a better question.

    Tuesday, February 5, 2013 10:56 AM
  • I have exactly the same problem. All worked fine prior the installation of VS Express 2012 and Net 4.5.

    Any solutions yet?

    Tuesday, June 4, 2013 1:37 PM
  • I know this issue is rather old, but I thought I would add a link to some .Net Framework documentation that states that 4.5 SqlClient does not support connecting to SQL Server 1997 databases (SQL Server 2000 databases are the same format). We had the same issue when we updated to 4.5.

    Friday, April 14, 2017 5:57 PM