Why a Proxy Works in Chrome but Fails in a Windows Service
Published
Confirm the route Chrome actually used
Open https://testmyproxies.com/api/my-ip in the Chrome profile that works, if your network allows this test endpoint. Record the time and the returned ip. If your organization provides its own approved HTTPS endpoint, use that same URL for both the browser and service checks. Comparing two different sites can be misleading because a proxy auto-configuration (PAC) script or bypass rule can choose a different route for each destination.
Check chrome://policy for managed proxy rules and see whether an extension controls the proxy in that profile. Chrome can also get its settings from Windows or its launch flags. If you need to verify the route, capture one request with chrome://net-export/ and check the proxy events for that request. Stop the capture after reproducing the request and keep it within your approved support channel. A PAC script can offer several routes, including a direct fallback. An exit IP establishes what the destination saw, and the proxy events or the proxy operator’s connection logs can confirm how the request got there. Chromium proxy configuration and diagnostics.
Read the WinHTTP settings and identify the service account
On the machine running the service, open PowerShell and run these read-only checks. Replace ExampleService with the internal service name shown in its properties in services.msc. StartName shows the configured logon account, which may be Local System, Network Service or a dedicated account. Microsoft Win32_Service reference.
Get-CimInstance -ClassName Win32_Service -Filter "Name = 'ExampleService'" |
Select-Object Name, StartName, State
netsh winhttp show proxy
show proxy displays the legacy static WinHTTP setting. On systems that support netsh winhttp show advproxy, check the advanced WinHTTP configuration as well. If the static view says Direct access (no proxy server), you have established what the legacy default contains. A WinHTTP client can choose automatic proxy selection, specify its own proxy or override it for one request. Another HTTP library might read the application’s configuration file or variables such as HTTPS_PROXY and NO_PROXY from the running service’s environment. Check the service’s documentation for its HTTP stack and the order in which it applies proxy settings. WinHTTP netsh reference · WinHTTP access modes.
Repeat the request from the running service
Use the installed service’s existing connection test or supported diagnostic if it accepts an approved test URL. Send it to the same URL you opened in Chrome. If it has no URL test, reproduce the failure through its usual workflow. Check the service’s application log or its Windows Event Viewer entries at the time of the request. Record the selected proxy or direct route when the service reports it, the error or HTTP status, and the returned IP if available. If the diagnostic launches a separate client, confirm that it uses the same HTTP stack and settings as the failing request. A PowerShell request from your desktop measures that PowerShell process’s configuration and credentials. PowerShell proxy checks.
Compare the result with Chrome while the same VPN connection is active. If the service fails at startup and works after sign-in, check when the proxy hostname and PAC URL become reachable through the VPN. A Windows Always On VPN user tunnel connects after sign-in, while a device tunnel can connect before it. If the service relies on per-user proxy settings, confirm which user profile is available to it when it starts. WinHTTP and user proxy settings · Windows VPN tunnel types.
Use the failure to narrow the cause
- HTTP 407. The proxy requested authentication. Check whether it accepts the service’s identity and whether the client supports its authentication scheme. Chrome may have authenticated using your Windows sign-in or a browser prompt. HTTP 407 Proxy Authentication Required · Authentication in WinHTTP.
- DNS error, connection refusal or timeout. Check the hostname, port and network path to the specific proxy the service selected. If automatic discovery is in use, check whether failure occurs while retrieving the PAC script or while connecting to the proxy it selects.
- Certificate error. Identify which TLS peer the service rejects and check the trust store its HTTP library uses. Keep certificate validation enabled. Diagnose proxy TLS errors.