Unable To connect to Database from visual studio 2022 ide for debugging

Sushil Agarwal 406 Reputation points
2024-07-08T17:32:58.74+00:00

Hello experts,

i am trying to connect to local pc sql server from visual studion 2022 community ide

its failing to establish connection by giving erro

connection was established scuusesfully but loin error occured SSL provide, error:0 the certificate chain issued by an authorty that is not untrusted

how to resolve this

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,110 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,788 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 36,511 Reputation points
    2024-07-09T01:43:56.3266667+00:00

    Hi @Sushil Agarwal,

    Try adding TrustServerCertificate=True; or adding Encrypt=False to your connection string.

    Regards,

    Zoe Hui


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

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Olaf Helper 44,501 Reputation points
    2024-07-08T18:34:07.52+00:00

    SSL provide,

    Add "Encrypt=False" to your connection string to surpress connection SSL encryption.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.