Orchestration:
- Windows Host
- My DB is running in a container on localhost:1444.
- My API is running in a container on localhost:5000/5001.
- They are both running on the default (
bridge
) network. - I can't use a custom network because currently our app references another API that is not in a container
At first I just left the connection string as .,1444
but realized that the container would have to look up outside of itself to get the host localhost it needed.
So far I've tried:
127.0.0.1:1444
host.docker.internal:1444
127.0.0.1,1444
host.docker.internal,1444
.,1444
I keep getting this error:
Connection id "0HLV8EI9HSV9D", Request id "0HLV8EI9HSV9D:00000009": An unhandled exception was thrown by the application.
System.Data.SqlClient.SqlException (0x80131904): 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)```