Error Connection to SQL Server from VS 2022 app

Dec 14 2022 5:44 PM

Hi!

I can´t connect to my SQL Server from my app in VS 2022.

Here is the message:

System.Data.SqlClient.SqlException: '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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)'

here is the connection string:

connectionString="Server=.\POINTMAN;Database=Tournament;Trusted_Connection=True;" providerName="System.Data.SqlClient"

I have Google and google for a solution and try all the greate tips. So I need som more help:

// Tyson


Answers (4)