I've built a simple api using asp.net core that returns some data from a sql server database.
It runs fine in VS and from the command line, but when i build and run the app as a docker container on my windows 10 machine when i call the api i keep getting this error
System.Data.SqlClient.SqlException: 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=425; handshake=265; [Login] initialization=5; authentication=9; [Post-Login] complete=14034; ---> System.ComponentModel.Win32Exception: Unknown error 258
I'm not really sure what this is telling me, it's as if it cant find the sql server machine. Do i have to expose port 1433
somehow in the docker config or when i run the container up?