xxxxxxxxxx
This error occurs because the SQL Server is using a certificate that isn't trusted by the machine.
1. Trust Server Certificate
Modify the connection string to include TrustServerCertificate=True. This setting will ignore SSL validation and allow the connection:
string connectionString = "Server=your_server;Database=your_database;User Id=your_user;Password=your_password;TrustServerCertificate=True;";
2. Update SQL Server Certificate
3. Install Certificate Manually
4. Update SQL Client Library
5. Check SSL/TLS Protocol Version
Powershell Array list
xxxxxxxxxx
[System.Collections.ArrayList]::new()