'Issues connecting SQLedge to asp.net projects on m1 mac

Back Story:

So I've been recently developing some c# sharp projects using a m1 Mac and a sql image (sqledge) hosted in a docker container. When trying to connect using entity framework to the container I get the results below. NB. I am able to connect to the container using azure data factory and I have enabled remote connections on the server.

Connection String used:

"DefaultConnection": "Server=(localhost);Database=aspnet-Webapplogin-40736292-40D4-4306-A965-8CCBFEEE3176;User Id= sa; Password=password;Trusted_Connection=True;MultipleActiveResultSets=true;"

dotnet ef database update: returns the Following

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: 35 - An internal exception was caught)



Solution 1:[1]

So it turn's out when connecting to the SQL Server image through docker I had to set trusted_connection=False for it to work

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy Caney