'Why do I get this error when accessing SQL Server Express LocalDB in a "Protected Process Light" (AM-PPL) service

I get this error:

Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)

I verified that SQLUserInstance for SQL Server 2016 Express and 2019 are signed with Microsoft Publisher certificate (1.3.6.1.4.311.76.8.1)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source