Error when attempting to use SQL 2016 LocalDb on Win 10 workstation

Mick-3237 1 Reputation point


My customer is attempting to use SQL 2016 LocalDB by installing the .msi file and then connecting through entity frameworks. This solution works fine on all but four of his workstations. On the workstations that are functioning correctly, he can connect to (LocalDb)\MSSQLLocalDB using SSMS. When attempting to connect on these four workstations, he receives the error below. We've tried disabling antivirus and another tool that we thought might interfere. Can anyone provide some guidance?

“Error occurred when attempting to start a result processing session. Additional error details: System.InvalidOperationException: This operation requires a connection to the 'master' database. Unable to create a connection to the 'master' database because the original database connection has been opened and credentials have been removed from the connection string. Supply an unopened connection. ---> System.Data.SqlClient.SqlException: 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: SQL Network Interfaces, 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.) ---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application”.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,774 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 77,771 Reputation points MVP

    So the localdb instance works, but the connection from .NET does not. And, well, it says Unable to load the SQLUserInstance.dll from the location specified in the registry. So that suggests that something is broken on those machines. I don't know the gory details here, but maybe you should make comparisons between the file system and the registry between a broken machine and a healthy one. Maybe the registry has been tampered with. Maybe the file is missing from disk?

    1 person found this answer helpful.

  2. AniyaTang-MSFT 5,476 Reputation points Microsoft Vendor

    Hi @Mick-3237

    I found a similar thread, maybe you can use it as a reference:

    For more information about SQL Server Express LocalDB, you can check this link;

    Best regards,


    0 comments No comments