For a line of business app use the checknetisolation.exe tool to grant the app a loopback exception.
To enable loopback use this command:
c:>checknetisolation loopbackexempt -a -n=<package family name>
To disable loopback use this command:
c:>checknetisolation loopbackexempt -d -n=<package family name>
The package family name for a UWP app can be found in several places: Visual Studio shows it in Package.appxmanifest editor on the packaging tab, PowerShell's get-appxpackage cmdlet displays it, etc. It will look something like "MyPackage_edj12ye0wwgwa"
In some cases loopback exemption will work for some time and then stop working. In this case you might need to run the following command to clean/remove all exemptions and then add them back one by one to get back in a good state. (from Pawel Sledzikowski's comment)
c:>checknetisolation loopbackexempt -c
There is a whitepaper with more details at https://msdn.microsoft.com/en-us/library/windows/apps/dn640582.aspx
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…