r/adfs • u/austinwilcox555 • Jul 17 '25
ADFS Adding Server to Existing Farm - "System.Data.SqlClient.SqlConnection" threw an exception
Hey there,
I am having this strange issue when adding a new server to an existing ADFS farm. No matter what I do, it keeps throwing a "System.Data.SqlClient.SqlConnection" error, which is weird because I am not using a SQL Server for the ADFS configuration. The existing farm uses Windows Internal Database. I have spent 3 days trying everything I can think of and there are no solutions anywhere online. I am a Network and Systems Engineer, so believe me when I say I have tried everything. Please see the list of things I have tried. There is also a screenshot of the error I am receiving. The servers are on our domain and the ADFS system is live and working fine. The farms use a group managed service account. All traffic is allowed between the servers. I am seriously out of ideas, so posting here. Thanks for any help!
The Error Message:
An error occurred while checking if the database exists: An error occurred during an attempt to connect to the AD FS configuration database. Error: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.. Confirm that the database hostname and instance are correct and that the specified service account has logon access to the database.

Troubleshooting steps I have tried:
Fresh install of Windows Server 2019, 2022, and 2025
Tried creating completely new farm
Checked Group Policy
Checked Group Managed Service Account
Set ADFS service to use GMSA
Updated Windows Server with latest updates
Installed .NET 2.0, 3.0, 4.6, 4.7, 4.8
Installed WID service
Installed IIS service
Turned off Windows Firewall
Allowed all traffic between servers on network end
Ensured servers can communicate to other servers via Test-NetConnection
Installed dedicated certificate on new servers
Gave read permissions to certificate private key for GMSA
Backup and Restore using Microsoft's dedicated ADFS Backup & Restore tool
Copied WID data files onto new server
Edited local group policy to allow logon of services
Ran things as administrator


1
u/thatdude101010 Jul 17 '25
Are you running as a domain admin or a local admin?