I upgraded a library from .NET 4.7 to .NET 8.0.
In doing so, I had to update my System.Data.SqlClient references to Microsoft.Data.SqlClient.
I have both projects open, in different VS sessions, side by side.
Both are passing the exact same connection string to the Open method on their respective versions of SqlConnection:
Data Source=MyDbServer;Initial Catalog=MyDatabase;Application Name=MyApplication;Pooling='true';Connection Lifetime=500;Integrated Security=SSPI;Persist Security Info=True;
The System.Data.SqlClient version of SqlConnection opens without trouble.
The Microsoft.Data.SqlClient version of SqlConnection raises this exception on Open():
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)'
Two questions:
Why does the
System.*version succeed, when theMicrosoft.*version doesn't?What do I need to change about my connection string to make this work? (i.e. - I don't want to change anything about the db server or db itself to get this to work... I only want to change the connection string)
Thanks
