Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9103203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:34:50+00:00 2026-06-17T01:34:50+00:00

I had a C# application that communicates with a database using Linq to SQL

  • 0

I had a C# application that communicates with a database using Linq to SQL and was working just fine when I last tested it a month ago. However, it is now throwing the following exception:

A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
------ Exception ------
Error:  A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The received certificate has expired.)

I am digitally signing the code with a Verisign key, but it has not expired. I don’t digitally sign until I build the installer, and this is occurring on my dev system in debug, so the code had not been signed.

It is also happening on other systems where the software was signed and installed. These systems access the same test database as I use on my dev system, and were working previously.

The line of code that causes the error follows:

        List<req> results = new List<req>();

        using (var db = new MyDbDataContext(connectionString))
        {
            var query =
                from item in db.reqs
                where item.senddate == null
                select item;

            results = query.ToList();
        }

The error happens when I call results = query.ToList();.

I use the following connection string:

Data Source=<removed>;Initial Catalog=<removed>;UID=sa;PWD=<removed>;Encrypt=true;Integrated Security=false

I am able to connect if I set Encrypt=false, but that is not a viable solution.

Again, this worked just fine the last time I tested it a couple weeks ago. Any insights as to what might be happening would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T01:34:52+00:00Added an answer on June 17, 2026 at 1:34 am

    I managed to find a solution from this post.

    Basically, I added TrustServerCertificate=True to my connection text, and everything started working again. I’m not sure why it stopped working in the first place, and if anyone knows if this will be a permanent solution or not, I would love to find out more about what happened.

    Thank you to Carson63000 and Jacco for the suggestions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had an application that hooked onto 1 single database. The app now needs
I'm currently working on a large and old C++ application that has had many
When working on some Javascript for a web application, I noticed that I had
A few years ago, I was working on a application that would communicate between
Good Day, I'm developing an application in VC++ that communicates using UDP protocol with
I had an application that was downloading a .CSV file from a password-protected website
If I had a java application that needed specific environment variables to be set,
I had a Visual Studio 2003 application that would render graphics to my web
I have an application that uses CoreData. I previously had a class named Marker
In my iPhone application I had an email address. If anyone touches touches that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.