I recently tried to connect my ASP.NET Core app to SQL Server via connected services. Unfortunately, after many attempts, I kept getting this error message (unfortunately it is in German):
Translation
Network-related or instance-specific error when connecting to SQL Server. The server was not found or is inaccessible. Check that the instance name is correct and that SQL Server allows remote connections. (provider: Named Pipes Provider, error: 40 - Connection to SQL Server could not be opened)