How to fix provider: SSL Provider, error: 0 - One or more of the parameters passed to the function was invalid.

Milind Panchal 0 Reputation points
2023-02-03T15:13:20.1966667+00:00

We have updated TLS 1.1 to 1.2 on application server where ASP.NET web application is hosted on IIS. The application is built with .Net framework 4.7.2. But after installing cipher on the application server, application unable to connect the SQL database ( 2014 SP3) and throwing the following error

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - One or more of the parameters passed to the function was invalid.)

If anyone has faced the same issue, please let us know here.

Windows development | Internet Information Services
Developer technologies | ASP.NET | Other
SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Naimish Makwana 175 Reputation points
    2023-02-06T07:06:09.9233333+00:00

    Hello Milind,

    If you are using ADO.NET, you can add the certificate information to the connection string by including the "Encrypt=true" and "TrustServerCertificate=true" options.

    string connectionString = "Data Source=YourServer;Initial Catalog=YourDB;Integrated Security=True;Encrypt=True;TrustServerCertificate=True";
    
    

    Kindly check if above details exist or not.

    Thanks

    Naimish Makwana

    1 person found this answer helpful.

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.