2

I am using Microsoft.EntityFrameworkCore (version 3.1.30) in a .NET Framework 4.8 WPF application to access a remote SQL Server 2016 Express.

On a specific instance I get this error:

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: HTTP Provider, error: 0 - )

The connection string is specified with IP address (not a named instance) and Trust server certificates = True

I can successfully connect if I manually specify the tcp: protocol before IP address

Why does SqlClient try to select HTTP Provider in this case?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.