Update-database shows provider: SNI_PN11, error: 26 - error locating server/instance specified error

Joined
Dec 17, 2021
Messages
1
Reaction score
0
update-database after adding migration on package manager console of Visual studio 2022 brings the following error:

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)

My database is in SQL server management studio 18. And I have already created the database there. Now I want to connect it with Visual Studio. Here is my connection code on appsettings.json:

Code:
"Logging": {

    "LogLevel": {

      "Default": "Information",

      "Microsoft": "Warning",

      "Microsoft.Hosting.Lifetime": "Information"

    }

  },

  "AllowedHosts": "*",

  "ConnectionStrings": {

    "DevConnection": "Server =(local)\\sqlexpress; Database=TiloshDesetDatabase; Trusted_Connection=True; MultipleActiveResultSets=True;"

  }

}

I have successfully added the migration but I don’t know why updating the database doesn’t work. Please help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top