I have created a Maui Blazor app in .NET 7 which is pretty neat and runs beautifully locally. After installing the app on another Windows 10 Pro x64 machine, I get an error message that SQL Server Express (2019) cannot be reached. I get this error message even if I set the connection string, of the target database explicitly in
appsettings.json, before publishing the MAUI app. Using a simple Winforms application, I have validated the connection string before publishing.
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: 26 - Error Locating Server/Instance Specified)
What I have tried:
SQL Server Management Settings:
I have checked the SQL Server Remote setting
I have checked the SQL Port and tried to set it to Default (1433)
Remote connection is switched on
TCP/IP are active
Named Pipe is not present
Firewall rules have already been created for: 135; 1433;1434;4022 & 1434 UDP created (inbound and outbound).
Firewall is switched off
The virus protection is turned off
SQL Profiler at all attempts no event is logged in the trace log of the SQL-Profiler
I have created a small project that illustrates my circumstance. If you are interested, you can have a look at it, compile it and install it on another machine/server.
Unfortunately, I can't upload a sample project here to better explain my starting point.
I'm pretty desperate because I just can't remember where I made a mistake.