Skip to content

TrustServerCertificate=true #3895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
15 tasks
CJP143 opened this issue Mar 26, 2025 · 0 comments
Open
15 tasks

TrustServerCertificate=true #3895

CJP143 opened this issue Mar 26, 2025 · 0 comments
Labels
Area-SQL / data querying bug Something isn't working

Comments

@CJP143
Copy link

CJP143 commented Mar 26, 2025

Describe the bug

I run #r "nuget: Microsoft.DotNet.Interactive.SqlServer, -" and it installs
• Microsoft.DotNet.lnteractive.SqlServer,1.UO-beta25160.1 fine and I used to use
#!connect mssql --kernel-name sqlconn --connection-string "Server=mydb; Database=mytbl;Trusted_connection=true"
but now get
Error: System.Exception: 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.)
which is fine as https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/certificate-chain-not-trusted?tabs=ole-db-driver-19 says to use ;TrustServerCertificate=true which again is fine but nothing happens the kernel just runs until I have to restart and I get no error messages.

part of log looks like the call fails for some reason but I get no message.
2025-03-26T09:44:38.1335309Z [00-26f13f87b68e3791897d36ff17ac5c20-d0149f4559aa06f0-00] ℹ ➡️ ConnectMsSqlKernel kernel://pid-18948/
2025-03-26T09:44:38.1335897Z [00-26f13f87b68e3791897d36ff17ac5c20-d0149f4559aa06f0-00] ℹ ⁞Ε⁞ CommandFailed Command failed: SubmitCode: #!connect mssql --kern ... (Command: SubmitCode, Token: LK8FxlFnRHyWi6yG5HtmeA==)
2025-03-26T09:44:38.1336142Z [00-26f13f87b68e3791897d36ff17ac5c20-d0149f4559aa06f0-00] ℹ ⬅️ CommandFailed kernel://pid-18948/csharp
2025-03-26T09:44:38.1337510Z [00-26f13f87b68e3791897d36ff17ac5c20-c905afc987ed6f71-00] ℹ ⁞Ε⁞ CommandFailed Command failed: SubmitCode: #!connect mssql --kern ... (Command: SubmitCode, Token: LK8FxlFnRHyWi6yG5HtmeA==)
2025-03-26T09:44:38.1337553Z [00-26f13f87b68e3791897d36ff17ac5c20-d0149f4559aa06f0-00] [KernelScheduler] [Run] ⏹ -> ✔ (2723.8331ms)

tried to use DOTNET_SQLTOOLSSERVICE_LOGFILE to see what messages returned but that failed with RPC error

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

Image

  • OS
    • Windows 11
    • [X ] Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • [ X] Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Screenshots

If applicable, add screenshots to help explain your problem.

@jonsequitur jonsequitur added Area-SQL / data querying bug Something isn't working labels Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-SQL / data querying bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants