Error “Connection Timeout Expired. The timeout period elapsed during the post-login phase.” when using integrated security option for the database connection during installation
000015830|5/5/2021 5:50 PM
You select the “Use integrated security” option in the GroupShare installation wizard, which will then use the defined Windows user to establish the connection to the database server.
It might be that the connection can be established initially and the process is starting but the installer will fail with the error message:
Failed to connect to server [SERVER NAME]. ->System.Data.SqlClient.SqlException: Connection Timeout Expired. The timeout period elapsed during the post-login phase.
The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=1; [Login] initialization=0; authentication=0; [Post-Login] complete=14000; ---> System.ComponentModel.Win32Exception: The wait operation timed out
Note: As the indicated error message can have other root causes (e.g. timeout settings on SQL server or similar issues), the following workaround may not work in some situations.
Workaround 1: Enable/Enforce “Enable computer and user accounts to be trusted for delegation”
Open the Registry Editor
Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb
Set the value of the ProtectionPolicy registry entry to 1
Note: If ProtectionPolicy doesn't exist, add DWORD (32bit) value, name it ProtectionPolicy and then change the value to 1.
Workaround 2: Create and use a SQL user login
Instead of using the “Use integrated security” feature in the GroupShare installation wizard to make use of the Windows user for the database connection, untick the “Use integrated security” in the installation wizard and use a SQL user login.
Note: SQL user needs to be created and appropriate permission/role assigned for the installation if not yet available.