linq-to-sql - SQL Azure : "The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it"

标签 linq-to-sql azure-sql-database azure-worker-roles

当我的 Azure 辅助角色尝试连接到 Azure SQL 数据库以使用 LINQ-to-SQL 调用 ExecuteCommand 时,我间歇性地收到以下 SQL 异常:

"The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it."

Google 似乎对这个错误信息一无所知。堆栈跟踪显示它在登录前握手期间失败:

System.Data.SqlClient.SqlException (0x80131904): The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
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 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataContext.ExecuteCommand(String command, Object[] parameters)

我发现了其他类似错误的报告,这些错误是由于登录前握手中的各种问题(其中对于握手中的任何问题,它只是回退到类似的错误消息),以及其他 SQL Server “强制加密”设置需要更改,但由于这是一个 Azure SQL 数据库,我无法进入并在 SQL Server 中更改此设置,我真的不希望我需要这样做。

因为我找不到关于这个特定错误的任何其他信息,而且它并不是每次都发生,所以我不确定去哪里找。关于从这里看哪里的任何指示?

编辑:除非另有说明,否则我将此错误归因于数据库服务器上来 self 的另一个托管服务的大量流量导致的暂时性错误。我问的后续问题中的详细信息:Can two Azure SQL databases on the same server affect each other's performance?

最佳答案

我今天早上遇到了这个问题,我可以从我的机器连接到我的 sql azure 实例,可以通过 sql azure 管理门户登录,但不能通过我的 azure 网站登录。

最终的解决方案是进入 Azure 网站的仪表板并将数据库添加为链接资源。

不是很明显,也许是巧合,但暂时它有效。

关于linq-to-sql - SQL Azure : "The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18599702/

相关文章:

sql-server - SQL Azure DTU 100% 故障排除

sql - 使用直接查询模式在 Azure SQL 数据库中使用存储过程

c# - 更改 IQueryable 的 DataContext

linq-to-sql - 如何在 LINQ-To-SQL (IDENTITY INSERT) 中手动设置标识字段

php - Azure Web应用程序服务器响应时间慢

azure - 唤醒 Windows Azure 辅助角色

Azure DiagnosticMonitor API 现已过时

sql-server - 从 LINQ to SQL 迁移到 DocumentDB 的好方法是什么?

.net - 使用LINQ to SQL的关系表上的动态Where子句

azure - 在 ServiceDefinition.csdef 中的 Azure IIS 站点上绑定(bind) 127.0.0.1