Layton ServiceDesk - Errors - OleDbException (0x80004005)
Contents |
Error Code: OleDbException (0x80004005)
Server Error in '/LaytonServiceDesk' Application. [DBNETLIB][ConnectionOpen (SECCreateCredentials().]SSL Security error. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (SECCreateCredentials().]SSL Security error. Source Error: [OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (SECCreateCredentials().]SSL Security error.]
Issue Summary
The LaytonServiceDesk ASP.NET application, deployed on Windows Server 2016 and developed using .NET Framework 4.5, is encountering a SQL Server connection failure. The error message is:
[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error.
This issue occurred after TLS 1.0 and TLS 1.1 were disabled on the SQL Server (Windows Server 2019) to enforce modern security protocols.
Root Cause Analysis
- The error results from a failed SSL/TLS handshake.
- The application uses a legacy SQL client (e.g., DBNETLIB or SQLOLEDB) that does not support or default to TLS 1.2.
- Additionally, .NET Framework 4.5 does not enable TLS 1.2 by default, even though the operating system supports it.
Proposed Resolution
Upgrade to a modern SQL client. Update the application's connection string to use MSOLEDBSQL or System.Data.SqlClient, both of which support TLS 1.2. MSOLEDBSQL was chosen for minimal required changes and to resolve the issue quickly.
Steps to Implement the Fix
IIS Configuration (Layton ServiceDesk Site)
1. Open IIS Manager (Run > inetmgr).
2. Expand the Sites node.
3. Locate and right-click the Layton site.
4. Select Explore to open the root directory:
6. Navigate to the bin folder:
7. Backup the existing files:
- App_Code.dll
- App_Code.compiled
8. Download a replacement set of files:
9. Unzip and replace the above files.
SQL Client Installation
1. Download the x64 Installer from Microsoft.
2. Run the installer.
Final Steps
- Reboot the server.
- Restart IIS.
- Run the application to verify connectivity to the SQL Server.

