PjotrH
Dotnet API and local DB connection string
Server=localhost,1433 produces this:
Microsoft.Data.SqlClient.SqlException (0x80131904): 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: TCP Provider, error: 40 - Could not open a connection to SQL Server)
So, closer? But still not working. Something wrong with the server config? (If that's the case why can I connect from two other applications?)
13 replies
Dotnet API and local DB connection string
@Jimmacle if I use Server=DESKTOP-5BORAFJ, I get this:
Microsoft.Data.SqlClient.SqlException (0x80131904): 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: TCP Provider, error: 35 - An internal exception was caught)
13 replies
Dotnet API and local DB connection string
For reference, this is the connection string VS SQL object explorer gives me:
Data Source=DESKTOP-5BORAFJ;User ID=sa;Password=**;Connect Timeout=30;Encrypt=False;Trust Server Certificate=True;Application Intent=ReadWrite;Multi Subnet Failover=False
(Tried it, doesn't work)
13 replies