s

500 Internal Server Error The certificate chain was issued by an authority that is not trusted edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 02 January 2024 | 112

Web Server throws 500 Internal Server Error. This is an error caused by SQL Server. error details below

The certificate chain was issued by an authority that is not trusted
500 Internal Server Error
[Win32Exception (0x80004005): The certificate chain was issued by an authority that is not trusted]

Solution

In the connection string change Encrypt=True;TrustServerCertificate=True;
Here is the full working connection string
<connectionStrings> <add connectionString="Server=192.168.1.4;Initial Catalog=yourdbname;Persist Security Info=False;User ID=yourusername;Password=Your password;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30" name="StoreCartConnection" providerName="System.Data.SqlClient" /> <connectionStrings>