LocalDb crashes on WinUI3 EFCore open connection method

reza noei 10 Reputation points
2023-07-19T11:22:07.0266667+00:00

Hi,
I'm trying to connect to my LocalDb using WinUI3. I can do Add-Migration using package-manager console but still I can't do anything at runtime.

Here is my error:

'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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.)'

This error raises from OpenInternal method in RelationalConnection.cs at the same time I have this error in Windows Event Viewer :

Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application. Reported at line: 3714.

I have removed MultipleActiveResultSets=true; from my connection string, It doesn't changed anything. I added MultipleActiveResultSets=true; It didn't changed the result also.

Here is my error.log for LocalDb:

error1.log

My Boss will beating me. 😁

Please help me.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
678 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
698 questions
{count} vote