How to connect GCP App Engine to GCP Compute Engine SQL Server?

0

I'm setting up a new App Engine on my new GCP project but I can't seem to connect the NetCore app to a SQL instance on a Compute Engine. When I run the app from Azure or on my local pc with the same connection string it connects and everything runs ok, until I upload it to GCP and it stops working.

I've opened all ports and managed to connect to the DB from SMSS, local and Azure.

The error I get every time I run it from google is:

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
sql-server
asp.net-core
error-handling
google-cloud-platform
timeout
asked on Stack Overflow May 15, 2019 by Andres Carmona

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0