Fix it now
All four codes here are proxy problems, and three of them are more specific than the article title suggests: a proxy that cannot be reached, a broken auto-configuration script, and a proxy that strips HTTP RANGE requests. Fix the one you actually have rather than bypassing inspection for all of them.
netsh winhttp show proxy
Test-NetConnection geo.prod.do.dsp.mp.microsoft.com -Port 443
w32tm /resync
- 0x80D05001 is DO_E_HTTP_BLOCKSIZE_MISMATCH. Microsoft’s documented remedy is to check the proxy configuration to permit HTTP RANGE requests, with rules for
*.download.windowsupdate.com,*.dl.delivery.mp.microsoft.comand*.delivery.mp.microsoft.com. - 0x80072F85 is the designated proxy server not being reachable, and 0x80072F86 is an error in the automatic proxy configuration script. Both are configuration faults, not TLS faults.
- For TLS inspection, ask for a bypass rather than more trust. Microsoft: TLS inspection must be disabled for Delivery Optimization and Microsoft Connected Cache endpoints, there is no workaround, and Delivery Optimization will not accept a substitute certificate.
- Confirm the clock. A skewed clock fails certificate validation on its own: Settings, Time & language, and turn on setting the time automatically.
Do not fix this with netsh winhttp set proxy. Microsoft advises against it: no proxy auto-detection, no support for explicit PAC URLs, no authentication to the proxy, and it is ignored by WinHTTP for requests using auto-discovery with an interactive user token.
If downloads complete after the proxy change, stop here. If they still fail, the next section takes the four codes apart – they are not the same fault.
Why it happens
0x80072EFD is WinINet 12029, ERROR_INTERNET_CANNOT_CONNECT: “the attempt to connect to the server failed.” That is the outermost symptom, and on a machine where a browser works it almost always means something in the path treated this traffic differently from browser traffic. The other three codes name which something.
0x80072F85 is WinINet 12165, ERROR_INTERNET_PROXY_SERVER_UNREACHABLE – the designated proxy server cannot be reached. 0x80072F86 is 12166, ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT – there was an error in the automatic proxy configuration script. Neither is a TLS failure. They point at the proxy configuration the client is using, which on Windows is not necessarily the one you set in Settings.
0x80D05001 is different again and it is the one worth reading carefully, because the usual advice does nothing for it. It is DO_E_HTTP_BLOCKSIZE_MISMATCH, and Microsoft’s guidance is specific: if downloads through a proxy server fail with it, or if you notice high CPU usage while updates are downloading, check the proxy configuration to permit HTTP RANGE requests to run. A proxy that strips range headers breaks the transfer no matter how the TLS is handled.
Where TLS inspection genuinely is the fault, the code it produces is 0x80072F0D – WinINet 12045, ERROR_INTERNET_INVALID_CA, “the function is unfamiliar with the Certificate Authority that generated the server’s certificate.” That is the appliance’s substituted certificate being rejected. Microsoft’s position on it is unambiguous: TLS inspection must be disabled for Delivery Optimization and Microsoft Connected Cache endpoints, there is no workaround, and Delivery Optimization will not accept a substitute certificate for those connections.
The proxy strips HTTP RANGE requests
You have this one if 0x80D05001, or downloads that crawl with high CPU while they run.
- Permit HTTP RANGE requests on the proxy for
*.download.windowsupdate.com,*.dl.delivery.mp.microsoft.comand*.delivery.mp.microsoft.com. - If you cannot allow them, know what you are choosing: Microsoft’s note is that you will be downloading more content than needed because delta patching will not work.
- This is not fixed by bypassing inspection. A proxy can pass TLS through untouched and still refuse range requests.
TLS inspection is applied to Microsoft endpoints
You have this one if 0x80072F0D, or the site certificate in a browser on the same machine is issued by your own appliance rather than by a public authority.
- Create a bypass rule rather than pushing more root certificates. Microsoft names
geo.prod.do.dsp.mp.microsoft.comandarray*.prod.do.dsp.mp.microsoft.comas endpoints that must bypass TLS inspection. - Microsoft’s stated criteria for bypassing a proxy altogether are that it performs TLS inspection, scans or modifies response content, hides the client’s true public IP in a way that harms peer-to-peer connectivity, or cannot be configured to avoid those behaviours.
- Turn inspection off only long enough to confirm the cause, then re-enable it with a targeted exclusion.
The service-context proxy is wrong or unreachable
You have this one if 0x80072F85, or netsh winhttp show proxy returning something that does not match what you configured.
- Read the current setting with
netsh winhttp show proxyfrom an elevated prompt. - Set it the way Microsoft recommends – device-wide Internet Explorer proxy settings, through the Network Proxy CSP for MDM or through Group Policy, rather than with netsh.
- The relevant policy is Computer Configuration, Administrative Templates, Windows Components, Internet Explorer, ‘Make proxy settings per-machine (rather than per-user)’.
The automatic proxy configuration script is broken
You have this one if 0x80072F86, on a network that hands out a PAC file.
- Fetch the PAC file by hand and read it. An error in the script produces this code regardless of what the proxy itself would have done.
- Check that the client can reach the PAC URL at all. A script that cannot be downloaded fails the same way as one that will not parse.
- Microsoft notes that netsh gives no support for explicit PAC URLs, which is one reason it is the wrong tool for this.
The clock is wrong
You have this one if Certificate errors on several unrelated services at once, on a machine that has been off for a long time or has a failing CMOS battery.
w32tm /resyncon the client, then retry.- Turn on automatic time and time zone in Settings, Time & language.
- If it will not stay set, check the hardware clock before spending more time on the network.
Full reference
The four codes, decoded
| Code | Source | Meaning |
|---|---|---|
0x80072EFD |
WinINet 12029 | ERROR_INTERNET_CANNOT_CONNECT – the attempt to connect to the server failed |
0x80D05001 |
Delivery Optimization | DO_E_HTTP_BLOCKSIZE_MISMATCH – permit HTTP RANGE requests on the proxy |
0x80072F85 |
WinINet 12165 | ERROR_INTERNET_PROXY_SERVER_UNREACHABLE – the designated proxy server cannot be reached |
0x80072F86 |
WinINet 12166 | ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT – there was an error in the automatic proxy configuration script |
0x80072F0D |
WinINet 12045 | ERROR_INTERNET_INVALID_CA – unfamiliar with the Certificate Authority that generated the server’s certificate. This is the TLS inspection code |
Setting a proxy the supported way
Windows keeps a separate proxy configuration for service-context traffic, which is why a proxy that works in your browser does not necessarily apply to the components doing the downloading. Microsoft’s recommendation for Delivery Optimization is device-wide Internet Explorer proxy settings, applied through the Network Proxy CSP for MDM-managed devices or through Group Policy, because that configuration works in both user and system contexts and therefore applies whether or not a user is signed in.
| Command | Status | Why |
|---|---|---|
netsh winhttp show proxy |
Use it | The diagnostic. Shows what the service context is actually using |
netsh winhttp import proxy source=ie |
Documented | Copies the Internet Explorer settings into the WinHTTP configuration |
netsh winhttp set proxy <server>:<port> |
Avoid | Microsoft advises against it: no auto-detection, no PAC URL support, no proxy authentication, and ignored by WinHTTP for auto-discovery requests with an interactive user token |
Endpoints and protocols
- Permit HTTP RANGE requests for
*.download.windowsupdate.com,*.dl.delivery.mp.microsoft.comand*.delivery.mp.microsoft.com. - Bypass TLS inspection for
geo.prod.do.dsp.mp.microsoft.comandarray*.prod.do.dsp.mp.microsoft.com. Microsoft states there is no workaround for these. - Follow the protocol Microsoft’s published endpoint list gives for each entry. Its own warning is that HTTP and HTTPS are not interchangeable here and the connection will fail if you swap them.
- Take the full list from Microsoft’s current endpoint documentation for the Windows version you run rather than from a rule set someone wrote years ago. The names change.
Proving where the block is
- Test the same account on a network with no proxy, such as a phone hotspot. If it works, the device is fine.
- Read the code from the failure, not from the client’s generic message. The four codes need four different changes.
Test-NetConnection <host> -Port 443from the client subnet, not from a server that sits in a different policy zone.- Pause the web or HTTPS scanning module in the security product briefly. If downloads then work, that module is the cause – re-enable it and add a targeted exclusion.
- Confirm the change on a second machine before rolling it out. A working exclusion on one device proves the rule; a working device proves nothing.
Leaving HTTPS scanning switched off across the estate is not a fix, it is a downgrade to your inspection coverage traded for a download. Scope the exclusion to the endpoints involved and put the module back on.
When a licence is the actual fix
Nothing here is solved by buying software on its own – the fix is a rule change on whatever sits between the client and Microsoft. What a licence buys you is the ability to make that rule change cleanly and keep it. The practical requirement for an endpoint suite in this situation is a console that lets you exclude named hosts and URL patterns from HTTPS scanning centrally, apply that exclusion to a group of machines rather than one at a time, and show you which policy is in force on a given device when it stops working again. Bitdefender GravityZone Business Security is the managed-console tier that gives you that central policy layer rather than per-device settings someone has to visit. Judge any candidate on whether its web protection exclusions are host-based and centrally managed, and check the behaviour yourself against the endpoints above before committing an estate to it – a suite that only lets you disable scanning wholesale will leave you choosing between working Store downloads and inspected traffic.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x80072EFD |
WinINet 12029, ERROR_INTERNET_CANNOT_CONNECT: ‘the attempt to connect to the server failed’ | Microsoft Learn |
0x80D05001 |
DO_E_HTTP_BLOCKSIZE_MISMATCH: Microsoft’s remedy is to check the proxy configuration to permit HTTP RANGE requests to run | Microsoft Learn |
0x80072F85 |
WinINet 12165, ERROR_INTERNET_PROXY_SERVER_UNREACHABLE: ‘the designated proxy server cannot be reached’ | Microsoft Learn |
0x80072F86 |
WinINet 12166, ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT: ‘there was an error in the automatic proxy configuration script’ | Microsoft Learn |
Confirm the fix worked
netsh winhttp show proxyreports the configuration you intended, on the machine that was failing.- A Store download completes at a sensible speed rather than crawling with high CPU, which is the other symptom Microsoft ties to the RANGE problem.
- The certificate presented for a Microsoft endpoint on that machine is issued by a public authority, not by your inspection appliance.
- A second machine behind the same proxy behaves the same way, so you know it was the rule and not the device.
Questions people ask about this
Can I just add my inspection appliance’s root certificate to the machines?
Not for these endpoints. Microsoft states that TLS inspection must be disabled for Delivery Optimization and Microsoft Connected Cache endpoints, that there is no workaround, and that Delivery Optimization will not accept a substitute certificate for those connections.
What are HTTP RANGE requests and why does the proxy care?
They let a client ask for part of a file rather than all of it, which is how delta patching works. A proxy configured to block them forces full downloads. Microsoft’s own note is that if you cannot allow RANGE requests you will be downloading more content than needed because delta patching will not work.
Why is netsh winhttp set proxy discouraged?
Microsoft lists four reasons: no auto-detection of the proxy, no support for explicit PAC URLs, no authentication to the proxy, and it is ignored by WinHTTP for requests that use auto-discovery with an interactive user token. Use device-wide Internet Explorer proxy settings through MDM or Group Policy instead.
The browser works on the same machine at the same moment. How can this be the network?
Because browser traffic and service-context traffic do not necessarily use the same proxy configuration, and because the components doing the downloading refuse a substituted certificate that a browser accepts. Both facts are documented, and both produce exactly this symptom.
