Skip to content

ch11-Logging and Monitoring STARTUP_MODE = "OnPremises" Run after Sql Container login error #213

@kssoftwangwg

Description

@kssoftwangwg

Hi, can you please help me solve the problem I'm having?

Select "Codebreaker.AppHost:OnPremises" setting after, run it, Codebreaker.GameAPIs[0] has error:
2024-09-27T14:21:50.6530000 2024-09-27T22:21:50.6361770 fail: Codebreaker.GameAPIs[0]
2024-09-27T14:21:50.6530000 Error updating database
2024-09-27T14:21:50.6530000 Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - Undefined error: 0).
error line at Codebreaker.GameAPIs.ApplicationServices.CreateOrUpdateDatabaseAsync(WebApplication app).

See Sql Container logs on docker: Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'CodebreakerSql'. [CLIENT: 192.168.215.1], maybe it's missing ef core Migrations files in project Codebreaker.GameAPIs?

If true reason of this, how to generate them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions