Having issue with Keyword not supported: 'trust server certificate in Visual Studio VB

Chaim Bochner 5 Reputation points

Hi. I'm trying to run VB code in visual studio form project but get an error when code is trying to run. Error is: "System.ArgumentException: 'Keyword not supported: 'trust server certificate'.'". The line in code affected is: "Using connection As New SqlConnection(My.Settings.ConnString)". My data source is "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog="C:\CHAIM\STUDIO SAMPLE PROJECT\SAMPLEDATABASEWALKTHROUGH\SALES.MDF";Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False" No luck trying ANYTHING suggested. I have windows 10 64bit on old laptop. Please assist. Thanks

An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,611 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
954 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 27,401 Reputation points Microsoft Vendor

    Hi @Chaim Bochner ,

    Try removing the space in Trust Server Certificate and Multi Subnet Failover.

    Best Regards.

    Jiachen Li

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    9 people found this answer helpful.