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.

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 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.
12,710 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Naimish Makwana 170 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.