The target principal name is incorrect

If you receive the error message:

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)

The most likely cause, when it occurs in SQL Source Control, is a certificate validation issue.

You can either fix the underlying certificate validation issue or you can work around the issue by setting the Trust Server Certificate setting to True in the SQL Server Management Studio's Connection Properties Options:



Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request