升级到.NET Framework 4.5后,使用System.Data.SqlClient.SqlConnection连接到SQL Server 2000数据库时出错 [英] Error connecting to SQL Server 2000 database using System.Data.SqlClient.SqlConnection after upgrading to .NET Framework 4.5

查看:454
本文介绍了升级到.NET Framework 4.5后,使用System.Data.SqlClient.SqlConnection连接到SQL Server 2000数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从.NET Framework 4升级到4.5后,我的应用程序不再能够使用System.Data.SqlClient.SqlConnection对象连接到SQL Server 2000数据库.  尝试连接时收到的错误是:

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:

*******************

*******************

连接超时已过期.尝试使用登录前握手确认时,超时时间已过.  这可能是因为登录前握手失败或服务器无法及时回复.  持续时间 尝试连接到该服务器时花费的时间是-[登录前]初始化= 25; handshake = 14974;

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;

*******************

*******************

.NET 4.5升级后,我仍然能够连接到SQL Server 2005和更高版本的数据库.在升级之前,我可以连接到SQL Server 2000数据库.我假设System.Data.SqlClient.SqlConnection中不再支持SQL Server 2000连接 从.NET 4.5开始的类.  有人可以验证是否确实存在这种情况,或者可以在我的连接字符串或其他地方执行某些操作来允许我使用.NET 4.5连接到SQL Server 2000数据库吗?

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?

谢谢

推荐答案

嗨Nth78,

Hi Nth78,

欢迎来到MSDN论坛.

Welcome to the MSDN Forum.

我还没有找到宣称4.5不支持sql server 2000的文档.

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

您是否在同一台计算机上构建了应用程序?现在,当您定位到4.0时,它工作正常吗?

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: http://blogs.msdn.com/b/spike/archive/2008/07/31/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation-or-the-server-is-not-responding.aspx 

最好的问候


这篇关于升级到.NET Framework 4.5后,使用System.Data.SqlClient.SqlConnection连接到SQL Server 2000数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆