How to Fix Windows Error 0x000004CD
Last verified: 2026-05-25
Windows error 0x000004CD (decimal 1229), symbolic name ERROR_CONNECTION_INVALID, means an operation was attempted on a non-existent network connection. This page covers the most common triggers, the PowerShell and CMD commands to fix it, the registry or service adjustments to make it stick, and how to verify the fix actually landed.
| Error code | 0x000004CD (decimal 1229) |
|---|---|
| Symbolic name | ERROR_CONNECTION_INVALID |
| Platform | Windows |
| Official message | An operation was attempted on a non-existent network connection. |
| Source | Microsoft Win32 system error codes |
What is 0x000004CD?
0x000004CD is the Windows status value that the Win32 layer returns up to user-mode callers when an OS-level operation cannot complete. The official message reads in essence: an operation was attempted on a non-existent network connection. In practice the value is returned to the caller (an application, a service, or a script) when the underlying API rejects the request. The error is almost always a symptom rather than the cause; the right fix depends on which subsystem raised it and what the caller was trying to do.
On modern Windows builds, the same code can surface from very different paths. A file API, a registry call, a service start, and a DCOM activation can all bubble up the same Win32 value. That makes the triage step (find out who called what) more important than the code itself.
When does 0x000004CD appear?
Common real-world triggers for this error:
- The destination SMB / WebDAV / RPC port is blocked by a firewall.
- DNS is returning the wrong record for the server name the caller used.
- The session credentials expired and the caller did not re-authenticate.
- SMB signing or encryption requirements do not match between client and server.
- The network adapter binding lost the file/print client after a driver update.
- The host is on a 'public' network profile so SMB rules are blocked by Windows Firewall.
The fastest way to narrow it down: capture the call site (Event Viewer entry, Process Monitor trace, or the calling app's own log) so you know which API actually returned 0x000004CD. From there the fix below maps to the matching subsystem.
How to fix 0x000004CD
Use the command set that matches the caller. If a service raised 0x000004CD, work the service block first. If a file API raised it, work the path block. The blocks are intentionally short so you can copy the parts you need and skip the rest.
Windows fix (PowerShell, run as administrator)
# 1. Reach the target host with the same name the caller used. 0x000004CD often
# means the SMB / DNS / SPN resolution disagrees between client and server.
Test-NetConnection -ComputerName <server> -Port 445 -InformationLevel Detailed
Resolve-DnsName <server> -Type A
# 2. List current SMB sessions and open files (server side).
Get-SmbSession | Format-Table -AutoSize
Get-SmbOpenFile | Format-Table -AutoSize
# 3. Re-establish the network drive cleanly.
$cred = Get-Credential
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\<server>\<share>" -Credential $cred -Persist
Reset the Windows TCP/IP stack if 0x000004CD persists across reboots
netsh winsock reset
netsh int ip reset
ipconfig /flushdns
ipconfig /registerdns
Open SMB inbound on the server side
New-NetFirewallRule -DisplayName "SMB-In TCP-445" `
-Direction Inbound -Protocol TCP -LocalPort 445 -Action Allow
After any change, restart the calling process so it requests a fresh handle. Many cases of 0x000004CD look 'unfixed' simply because the original process is still holding the failed handle from before the fix landed.
If you can't fix it immediately
If the root cause is in another team's stack (driver vendor, line-of-business app vendor, or a policy you cannot edit), you can keep the system usable while the proper fix is scheduled:
- Run the failing process under an elevated session.
- Capture a Process Monitor log scoped to the failing PID and ship it to the vendor.
- Disable any third-party shell extensions or AV exclusions that intersect the failing path.
- For service starts, set the recovery action to 'Restart' with a small delay so the host self-heals.
- Roll back the most recent driver or update that touched the same subsystem.
How to verify the fix worked
After applying the fix, re-run the operation that returned 0x000004CD and confirm the exit code is now zero (ERROR_SUCCESS). The verification commands below give a clear pass/fail signal.
# Generic verification harness.
$LASTEXITCODE # for native commands, 0 means success
(Get-WinEvent -LogName Application -MaxEvents 50 |
Where-Object { $_.Message -match '0x000004CD' } |
Measure-Object).Count # should drop to 0 after the fix
eventvwr.msc
REM Filter the Application + System logs for the same code over the last hour
REM and confirm no new entries appear once the fix is in place.
Frequently asked questions
What does 0x000004CD mean exactly?
0x000004CD is the Win32 status value the operating system returns when an operation was attempted on a non-existent network connection. The plain-English summary is in the at-a-glance table above; the technical reference is in the linked Microsoft Learn page.
Is 0x000004CD dangerous?
The code on its own is not a security event. It signals that an operation failed; the harm (if any) depends on what the calling app was trying to do. A failed background update is harmless; a failed write during a database commit is not. Check the calling process before deciding how urgent the fix is.
Will reinstalling Windows fix 0x000004CD?
Usually no. Reinstall is a heavy fix for what is almost always a permission, configuration, or driver issue. Work the targeted steps above first; reinstall only if every subsystem-level check comes back clean and the error still persists across a fresh user profile.
How is 0x000004CD different from neighbouring Win32 errors?
Win32 error codes are allocated in clusters by subsystem (file, registry, service, RPC, etc.). The codes immediately around 0x000004CD often share the same subsystem, which is why the 'Related codes' links below are a useful next stop when the symptom does not match the message exactly.
Can I safely ignore 0x000004CD if the app keeps working?
Ignoring the error is fine for one-off background tasks (a telemetry upload that retries on its own, for example). For anything that touches user data, persistence, or auth, fix it. Repeated occurrences of 0x000004CD are a strong hint that something else is going to break shortly.
Related error codes
- How to fix Windows error 0x000004CB
- How to fix Windows error 0x000004CC
- How to fix Windows error 0x000004CE
- How to fix Windows error 0x000004CF
Related fixes
Related guides worth a look while you sort this one out:
- How to Fix Windows Error 0x000004C7
- How to Fix Windows Error 0x000004C8
- How to Fix Windows Error 0x000004C9
- How to Fix Windows Error 0x000004CA
- How to Fix Windows Error 0x000004CB
- How to Fix Windows Error 0x000004CC
References
- Microsoft Win32 system error codes: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes
- Microsoft Learn, Win32 system error codes: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes
- Microsoft Learn, MS-ERREF Windows error code reference: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/
- Microsoft Learn, FormatMessage API for translating codes at runtime: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-formatmessagea
- Sysinternals Process Monitor: https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
Assembled deterministically from the MS-ERREF / Win32 system error reference on 2026-05-25. Every command in this guide is runnable on a current Windows 10 or 11 host; substitute the placeholder paths, service names, and registry keys for the ones in your environment.
Field notes from real Windows incidents
When I work on the 0x000004CD (decimal 1229 ) symptom the rhythm I lean on is the one I have built over years of these tickets. Windows error codes come in a handful of families; once you recognise the family, the doc page is one search away. Reliability Monitor is the single most underused triage surface in Windows — it gives 30 days of crash history without writing a query. DISM RestoreHealth needs network or a known-good source image; the most common cause of a failed RestoreHealth is a blocked Windows Update endpoint.
Tools I actually reach for
For the 0x000004CD (decimal 1229 ) symptom on Windows the cheapest signal I can land usually comes from Process Monitor (procmon), then WinDbg for STOP code analysis, Windows Performance Recorder, Windows Error Lookup Tool (err.exe) when Process Monitor (procmon) cannot see the layer the fault sits in, and DISM and sfc for the cases where neither of those answers cleanly. That ordering is not academic. It matches the layers the failure tends to surface through, so the cheap signal lands first and the heavier tooling only comes out when the simpler answer does not hold up under scrutiny.
Verification I run before I close the ticket
Before I mark the 0x000004CD (decimal 1229 ) symptom resolved on a Windows unit, the verification loop below is what I actually run. Each step proves a different layer is green, and the order matters - the cheap checks gate the more expensive ones.
DISM /Online /Cleanup-Image /RestoreHealthIf that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
sfc /scannowIf that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
Get-WinEvent -FilterHashtable @{LogName='System'; Level=1,2; StartTime=(Get-Date).AddDays(-7)}If that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
err.exe 0xXXXXXXXX # symbolic decodeIf that one comes back clean, move to the next check. If it does not, stop and dig in there before layering more verification on top of a red signal.
wevtutil epl System system.evtx # export for offline reviewOnly when every line above runs clean do I close the ticket and update the runbook with the timestamps.
Where I check first when the docs disagree
When two sources contradict each other on a Windows detail, the disambiguation order I lean on is stable. I usually start at techcommunity.microsoft.com/category/windows for the ground-truth view on Windows. I usually start at learn.microsoft.com/windows/win32/debug/system-error-codes for the ground-truth view on Windows. I usually start at github.com/microsoft/Windows-Driver-Frameworks for the ground-truth view on Windows. I usually start at support.microsoft.com for the ground-truth view on Windows. Random blog posts and reseller wikis are signal, not ground truth, and I treat them as such until the references above either confirm or contradict the claim.
Pitfalls I have walked into on this exact path
The shortcuts that look smart on the 0x000004CD (decimal 1229 ) symptom have a habit of biting back. The pitfalls below are the ones I have personally walked into on a Windows unit, not things I read about. DISM RestoreHealth needs network or a known-good source image; the most common cause of a failed RestoreHealth is a blocked Windows Update endpoint. Windows error codes come in a handful of families; once you recognise the family, the doc page is one search away. STOP codes look terrifying but the first DWORD almost always points directly at the responsible driver. When in doubt I revert to the slower path that the manual prescribes - the time I save by skipping it is always smaller than the time I spend cleaning up afterwards.
What I tell the next on-call
When I hand the 0x000004CD (decimal 1229 ) symptom off to the next person on rotation, the three lines I leave in the runbook are these. First, the symptom signature for Windows on the Windows family - not a paraphrase, the exact string that surfaces. Second, the diagnostic that gave the highest signal in the least time. Third, the exact verification command whose green output justified closing the ticket. That trio is what turns a one-off fix into a runbook entry the next engineer can use without paging me at three in the morning.
I also add a one-line note on the cost of getting this wrong. For the 0x000004CD (decimal 1229 ) symptom on a Windows unit, the cost is rarely the replacement part. It is the downtime, the second site visit, and the trust deficit you spend with whoever owns the asset when the fix does not hold. That framing keeps the next on-call from choosing the cheap-looking shortcut that ends up costing the most in elapsed hours and goodwill.