Home >Backend Development >C++ >How to Fix 'net_http_client_execution_error' in UWP Apps by Enabling Local Loopback?
UWP applications packaged as .appxbundles may experience "net_http_client_execution_error" when attempting to access localhost (127.0.0.1). This is due to Windows' default security restrictions.
Enabling Loopback Access for UWP Apps
The solution involves using the checknetisolation.exe
command-line tool to manage network isolation settings.
Using checknetisolation.exe
:
This tool allows modification of an app's network access permissions.
Granting Loopback Access:
Execute this command to enable loopback access:
<code>c:\>checknetisolation loopbackexempt -a -n=<package family name></code>
Revoking Loopback Access:
Use this command to remove loopback access:
<code>c:\>checknetisolation loopbackexempt -d -n=<package family name></code>
Finding the Package Family Name:
Locate your app's package family name (e.g., "MyPackage_edj12ye0wwgwa") within Visual Studio's Package.appxmanifest
editor or using the PowerShell command Get-AppxPackage
.
Rectifying Intermittent Loopback Problems
If loopback access becomes unreliable, try these steps:
Clearing Existing Exemptions:
First, remove all existing loopback exemptions using:
<code>c:\>checknetisolation loopbackexempt -c</code>
Re-applying Exemptions:
Then, individually re-grant loopback access to each application requiring it.
For comprehensive details, refer to the official Microsoft documentation: https://www.php.cn/link/10a9288f519d683f87f6443f7b6810e6.
The above is the detailed content of How to Fix 'net_http_client_execution_error' in UWP Apps by Enabling Local Loopback?. For more information, please follow other related articles on the PHP Chinese website!