I'm getting the following sql server error when I try to connect my Google Cloud SQL instance through App Engine.
Login failed for user '\9b73cfe90ee8d1d$'. Reason: Token-based server access validation failed with an infrastructure error. Login lacks connect endpoint permission.
I have added the App engine users to the SQL Projects as admin however this does not fix the problem.
Connecting locally through the Cloud Proxy works, however using the same connection string.
Dotnet gives me the following exception when trying to connect:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server
My app Yaml
runtime: aspnetcore
env: flex
service: platform
manual_scaling:
instances: 1
resources:
cpu: 2
memory_gb: 1.5
disk_size_gb: 10
beta_settings:
cloud_sql_instances: shared-resources-291914:europe-west2:sqlserver-edutec
The connection string:
"ConnectionStrings": {
"default": "Server=127.0.0.1;Database=cliche;User Id=sqlserver;Password=password;"
},
This is a known limitation on Google Cloud side.
SQL Server error logs: "Login failed for user. Reason: Token-based server access validation failed with an infrastructure error
The Google Cloud Sql Engineering Team is working on solving the issue.
It is well worth to ‘star’ the thread to ensure that you receive updates about it.