user3497702
user3497702

Reputation: 841

ASP.NET MVC web app on .NET 4.7.1 updated Microsoft.Data.SqlClient Nuget Update from 1.1.0 to 5.2.2/4.0.6

My ASP.NET MVC web app on .NET 4.7.1 updated Microsoft.Data.SqlClient Nuget package from 1.1.0 to 5.2.2.

I get this error:

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

If I update to 4.0.6, I get this error instead:

Microsoft.Data.SqlClient.SqlException:
A connection was successfully established with the server, but then an error occurred during the login process.
(provider: SSL Provider, error: 0 - The target principal name is incorrect.)

I tried adding

Trusted_Connection=True;TrustServerCertificate=True;Encrypt=False 

but I still get that error.

Please advise

Upvotes: 0

Views: 50

Answers (0)

Related Questions