Issue to update database

Viewed 56

SQL Server is running over TCP/IP.

When I try to first update-database

PM> update-database

Build started... Build succeeded. ........... ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:-1,State:0,Class:20 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: SNI_PN11, error: 26 - Error Locating Server/Instance Specified)

Firewall is correct, rules are added for ports 1433, 1434, 55120.

I have a connection in Visual Studio to SQL Server The connection string in appsettings.json is:

"ConnectionStrings": {
    "ProductionManagmentContext": "Server=DESKTOP-MAQO344\\SQLEXPRESS;Database=ProductionManagment.Data;Trusted_Connection=True;MultipleActiveResultSets=true"
0 Answers
Related