- 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:
I have successfully added the migration but I don’t know why updating the database doesn’t work. Please help.
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.