2

We have a SQL Server database in Azure. In the same resource group is an App Service.

The App service connects to the database, using the connection string:

Server=tcp:[server].database.windows.net,1433;Initial Catalog=[database];
Persist Security Info=False;User ID=[Username];Password=[Password];
MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;
Connection Timeout=30;

This has been working for some time, but recently it is consistently getting this error:

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.

System.InvalidOperationException: An exception has been raised that is likely 
due to a transient failure. Consider enabling transient error resiliency by 
adding 'EnableRetryOnFailure()' to the 'UseSqlServer' call.

ClientConnectionId:[GUID]

Error Number:10060,State:0,Class:20

Routing Destination:[id].tr49.westeurope1-a.worker.database.windows.net,11120

I can access the database with the same credentials via SSMS from my desktop computer, and can also access it via the Query Editor in Azure.

I don't know how to start diagnosing this (other than to drop and recreate the database!). Any ideas?

0 Answers0