Visual Studio Debug SQL Server Connection String - "SSL Provider, error 0 - The certificate chain was issued by an authority that is not trusted"
03:38 11 Mar 2024

I recently wiped my laptop and reinstalled everything, including Visual Studio. Since doing so, my connection string for an intranet web app (connecting to a local SQL Server DB) no longer works in debug...


It works fine when deployed to a server, but when I try to run the app in debug I get the error "SSL Provider, error 0 - The certificate chain was issued by an authority that is not trusted". The posts I've found matching this error typically suggest to use (with caution for an external facing app) encrypt=false or TrustServerCertificate=true. When I try these, the text is underlined in green and tooltip displays "the encrypt attribute is not allowed". Have tried updating "System.Data.SQLClient" to "Microsoft.Data.SQLClient" but this doesn't appear to make any difference. Can anyone assist please? Thanks

sql-server connection-string