I am using Visual Studio 2017 for mac with dotnet Core and EF Core. After setting up the mssql image in the Docker container, I tried to add a connection string, but reset the connection error. I tried to use various parameters such as ip address, container name, host name, etc. As the server name, but none of them worked.
"Default": "Server=172.17.0.2; Database=ERPDb; User=sa; Password =******;"
with container name
"Default": "Server=ecstatic_hermann; Database=ERPDb; User=sa; Password=******;"
with hostname:
"Default": "Server=f45840a59623; Database=ERPDb; User=sa; Password=******;"
When connecting through localhost in the terminal, its successful connection
$ mssql -s localhost -p Technocrat123 Connecting to localhost...done sql-cli version 0.6.2 Enter ".help" for usage hints.
But when the application starts, the connection fails.
Appreciate any help. Thanks in advance.
When using localhost error
Login failed for user ''. Reason: An attempt to login using SQL authentication failed. Server is configured for Integrated authentication only.
user2695433
source share