After I migrated my project to .NET 7 I had to add the TrustServerCertificate=true; setting in the connection string otherwise the following error is thrown: SqlException: A connection was successfully established with the server, but then an error occurred during the login process.
In .NET 5 or 6 this is not necessary. Can anyone tell me why it is necessary to add this setting in the connection string?
LOCAL CONNECTION STRING:
Server=localhost;Database=Xpz;Integrated Security=SSPI;TrustServerCertificate=true;