![尝试连接到 Azure SQL Server 时出现“远程主机强制关闭现有连接”](https://linux22.com/image/760602/%E5%B0%9D%E8%AF%95%E8%BF%9E%E6%8E%A5%E5%88%B0%20Azure%20SQL%20Server%20%E6%97%B6%E5%87%BA%E7%8E%B0%E2%80%9C%E8%BF%9C%E7%A8%8B%E4%B8%BB%E6%9C%BA%E5%BC%BA%E5%88%B6%E5%85%B3%E9%97%AD%E7%8E%B0%E6%9C%89%E8%BF%9E%E6%8E%A5%E2%80%9D.png)
我正在尝试将 SQL 数据库部署到我的 Azure SQL 服务器。当我尝试连接到目标服务器时,出现以下错误。我正在使用 Windows 10 1909 上的 Microsoft SQL Server Management Studio 18。有什么建议吗?
===================================
无法连接到 quickkartserver1.database.windows.net。
===================================
已成功与服务器建立连接,但在登录前握手期间发生错误。(提供程序:TCP 提供程序,错误:0 - 远程主机强制关闭现有连接。)(.Net SqlClient 数据提供程序)
服务器名称:quickkartserver1.database.windows.net 错误编号:10054 严重性:20 状态:0
项目地点:
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity 身份、SqlConnectionString connectionOptions、SqlCredential 凭证、对象提供程序信息、字符串 newPassword、SecureString newSecurePassword、布尔值 redirectedUserInstance、SqlConnectionString userConnectionOptions、SessionData reconnectSessionData、DbConnectionPool 池、字符串 accessToken、布尔值 applyTransientFaultHandling、SqlAuthenticationProviderManager sqlAuthProviderManager)在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions 选项、DbConnectionPoolKey poolKey、对象 poolGroupProviderInfo、DbConnectionPool 池、DbConnection owningConnection、DbConnectionOptions userOptions)在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup,DbConnectionOptions userOptions)在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,TaskCompletionSource 1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
1 retry,DbConnectionOptions userOptions)在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource 1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource
1 retry)在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)在 System.Data.SqlClient.SqlConnection.Open()在 Microsoft.SqlServer.Management.Dac.DacWizard.WizardUtility.VerifyConnection(UIConnectionInfo ci,IServerType serverType)在 Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
===================================
远程主机强制关闭现有连接
答案1
我要结束这个问题了。我找到了一种解决方法,那就是将我的项目转移到可以连接到 SQL 服务器的笔记本电脑上。谢谢。