What are the challenges you face when working across database platforms? Take the survey
Options

Keyword not supported: 'trust server certificate'.

Working on version 4.2.20168, and encounter error Keyword not supported: 'trust server certificate'.
remove Trust Server Certificate=True, then got error Invalid connection string: Keyword not supported: 'multi subnet failover'.
remove Multi Subnet Failover=False, then got Error connecting to database: 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.)

According https://stackoverflow.com/questions/17615260/the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-when-conn, I add Trust Server Certificate=True to the end of ShadowConnectionString section and make it work.

  <ShadowConnectionString>Data Source=ip;Initial Catalog=Chuck2_Connect5;User ID=clu;Password=;Pooling=False;Encrypt=False;Trust Server Certificate=True;Authentication=SqlPassword;Multi Subnet Failover=False</ShadowConnectionString>
changed to
 <ShadowConnectionString>Data Source=ip;Initial Catalog=Chuck2_Connect5;User ID=clu;Password=;Pooling=False;Encrypt=False;Authentication=SqlPassword;TrustServerCertificate=True</ShadowConnectionString>








Best Answers

  • Options
    chuckchuck Posts: 29 Bronze 2
    edited July 20, 2020 10:03AM Answer ✓
    Just in case someone else encounter the same problem
    Trust Server Certificate=True changed to TrustServerCertificate=True
    Multi Subnet Failover=False changed to MultiSubnetFailover=False
    Remove the space in key will solve the problem




  • Options
    chuckchuck Posts: 29 Bronze 2
    The problem was  introduced in 4.2.20176 - June 24th, 2020.
    I previously use 4.2.20168 open the old project created by 4.2.20176.







Answers

  • Options
    arick111arick111 Posts: 2 New member
    chuck said:
    Working on version 4.2.20168, and encounter error Keyword not supported: 'trust server certificate'.
    remove Trust Server Certificate=True, then got error Invalid connection string: Keyword not supported: 'multi subnet failover'.
    remove Multi Subnet Failover=False, then got Error connecting to database: 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.)

    According https://stackoverflow.com/questions/17615260/the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-when-conn, I add Trust Server Certificate=True to the end of ShadowConnectionString section and make it work.

      <ShadowConnectionString>Data Source=ip;Initial Catalog=Chuck2_Connect5;User ID=clu;Password=;Pooling=False;Encrypt=False;Trust Server Certificate=True;Authentication=SqlPassword;Multi Subnet Failover=False</ShadowConnectionString>
    changed to
     <ShadowConnectionString>Data Source=ip;Initial Catalog=Chuck2_Connect5;User ID=clu;Password=;Pooling=False;Encrypt=False;Authentication=SqlPassword;TrustServerCertificate=True</ShadowConnectionString>








    The user encountered errors when connecting to a database with version 4.2.20168. They resolved the issue by adjusting the connection string and adding Trust Server Certificate=True to the end of the ShadowConnectionString section. This change allowed them to successfully establish a connection to the database.


  • Options
    I just wanted to let you know in case anyone else encounters the same issue
    Added TrustServerCertificate=True to TrustServer Certificate=True
    Fault over to multiple subnets = False changed to Fault over to multiple subnets = False
    Eliminating the space in the key will fix the issue.
  • Options
    philljones22philljones22 Posts: 7 New member
    To resolve the connection string errors you encountered, you adjusted the `ShadowConnectionString` configuration in a specific sequence. Here’s a summary of the process and the final configuration that worked:

    1. **Initial Error:**
       You encountered an error indicating that the keyword `Trust Server Certificate` was not supported.
       
       ```
       Keyword not supported: 'trust server certificate'.
       ```

    2. **Attempted Fix:**
       You removed `Trust Server Certificate=True`, which led to a new error regarding `Multi Subnet Failover`.

       ```
       Invalid connection string: Keyword not supported: 'multi subnet failover'.
       ```

    3. **Subsequent Error:**
       Removing `Multi Subnet Failover=False` resulted in an SSL-related error during the login process.

       ```
       Error connecting to database: 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.)
       ```

    4. **Final Adjustment:**
       Based on the solution found on StackOverflow, you added `Trust Server Certificate=True` back to the connection string, ensuring it was placed at the end of the `ShadowConnectionString` section.

    ### Final Connection String

    Here is the final, corrected `ShadowConnectionString` that resolved the errors:

    ```xml
    <ShadowConnectionString>Data Source=ip;Initial Catalog=Chuck2_Connect5;User ID=clu;Password=;Pooling=False;Encrypt=False;Authentication=SqlPassword;TrustServerCertificate=True</ShadowConnectionString>
    ```

    ### Explanation of Changes

    - **Trust Server Certificate=True**: This parameter tells the client to trust the server's SSL certificate without validating it. This resolves the SSL Provider error regarding the certificate chain being issued by an authority that is not trusted.
      
    - **Placement and Formatting**: By placing `Trust Server Certificate=True` at the end of the connection string and ensuring correct formatting (no spaces within the keyword), the connection string is interpreted correctly by the connection manager.

    ### Conclusion

    These adjustments resolved the connection issues by instructing the system to trust the server certificate and removing unsupported keywords. This ensures a successful and secure connection to the database.
  • Options
    JonahwillsJonahwills Posts: 1 New member

    In version 4.2.20168, encountering errors related to the connection string parameters 'Trust Server Certificate' and 'Multi Subnet Failover' prompted troubleshooting steps. Initially, removing 'Trust Server Certificate=True' led to an error regarding 'Multi Subnet Failover'. Subsequently, eliminating 'Multi Subnet Failover=False' resulted in a new error concerning the SSL certificate chain. Following guidance from Stack Overflow, the resolution involved appending 'Trust Server Certificate=True' to the end of the ShadowConnectionString section. This adjustment ensured successful database connectivity, emphasizing the importance of meticulous configuration in resolving connection issues.


  • Options
    Steven_CoolSteven_Cool Posts: 1 New member


    1. First Problem: You saw an error saying "Keyword not supported: 'trust server certificate'". To fix this, you removed Trust Server Certificate=True from your connection details.

    2. Second Problem: Then you got another error saying "Keyword not supported: 'multi subnet failover'". To fix this, you removed Multi Subnet Failover=False from your connection details.

    3. Third Problem: After that, you faced another error saying "Error connecting to database... The certificate chain was issued by an authority that is not trusted." This means the system didn't trust the security certificate.

      Final Solution: You followed advice from a website and added Trust Server Certificate=True again at the end of your connection details. Now it worked!

    So, here is what your connection details should look like:

    <p><ShadowConnectionString>Data Source=ip;Initial Catalog=Chuck2_Connect5;User ID=clu;Password=;Pooling=False;Encrypt=False;Authentication=SqlPassword;TrustServerCertificate=True</ShadowConnectionString></p><div></div>

    This way, you should be able to connect without any problems. If you still facing any issue, then do let me know i'll try to figure out!

Sign In or Register to comment.