如何将GCP App Engine连接到GCP Compute Engine SQL Server?

时间:2019-05-15 23:08:59

标签: sql-server asp.net-core error-handling google-cloud-platform timeout

我正在新的GCP项目上设置新的App Engine,但似乎无法将NetCore应用程序连接到Compute Engine上的SQL实例。当我从Azure或在本地PC上使用相同的连接字符串运行该应用程序时,它将连接并且一切运行正常,直到将其上传到GCP并停止工作为止。

我已经打开了所有端口,并设法从SMSS,本地和Azure连接到数据库。

我每次从google运行该错误是:

System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=2; handshake=6; [Login] initialization=0; authentication=0; [Post-Login] complete=14177; ---> System.ComponentModel.Win32Exception (258): Unknown error 258

0 个答案:

没有答案
相关问题