Win32Exception: The certificate chain was issued by an authority that is not trusted

  • Page Owner: Not Set
  • Last Reviewed: 2022-07-08

When upgrading a CMS 12, dotnet5 project to dotnet 6, I got the following error:

An error occurred while starting the application.
Win32Exception: The certificate chain was issued by an authority that is not trusted.
Unknown location

SqlException: 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.)
Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction)

InitializationException: Initialize action failed for Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=12.8.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()

Additional Posts

I was able to fix locally by add Encrypt=No to my connection string

  "ConnectionStrings": {
    "EPiServerDB": "Data Source=.;Initial Catalog=XXX;Integrated Security=True;Connect Timeout=30;MultipleActiveResultSets=True;Encrypt=No"
  }