I've been trying to connect .net 5 app with mssql server using docker. I've been always getting this error: Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sa'.
This is appsetting.json file:
"ConnectionStrings": {
"OrderingConnectionString": "Server=localhost;Database=OrderDb;User
Id=sa;Password=SwN@12345678;"
},
This is docker-compose.yml file:
orderdb:
image: mcr.microsoft.com/mssql/server:2017-latest
This is docker-compose.override.yml file
orderdb:
container_name: orderdb
environment:
SA_PASSWORD: "SwN@12345678"
ACCEPT_EULA: "Y"
restart: always
ports:
- "1433:1433"
Can anyone help me to solve that?
User contributions licensed under CC BY-SA 3.0