In most cases, some aspect of the SQL Server configuration needs to be changed. If you’re able to connect to your database from another type of desktop application such as a Windows Forms or WPF application, ensure that you’ve enabled TCP/IP for SQL Server. You can do that in the Computer Management console.

Then, make sure that your SQL Server Browser service is running.

Then, in windows firewall, search aklau simple query UWP. In Inbound rules > Advanced authorizes Public and sets edge transversal on Allow edge trasveral.

Finally, in Outbound rules > Advanced, authorizes Public.

Network isolation

For security reasons, a UWP app that is installed in the standard manner is not allowed to make network calls to the device it is installed on (localhost connections).

It’s not a bug it’s a feature, called network isolation. It was introduced in Windows 8 (where Metro apps were called Windows Runtime apps).

There are some GUI tools such as Enable Loopback Utility and Loopback Exemption Manager which make this task easier:

Search and select “aKlau simple query UWP”, then save changes.

https://stackoverflow.com/a/39317424/6911541