I know this error's a pain — you're just trying to open or save a file over the network, and Windows throws up a code that means nothing at first glance. Let's kill it fast.
The Short Fix: Restart the Service or Clear Stale Handles
Most of the time, this error comes from a program holding onto a file handle that the server already closed. The simplest fix that works 9 times out of 10: restart the Server service on the machine sharing the file.
- Press Win + R, type
services.msc, hit Enter. - Scroll down to Server. Right-click it and choose Restart.
- Wait 10 seconds for it to fully stop and restart. You'll see the status go from Stopped back to Running.
- Try your file operation again.
If restarting the service doesn't cut it, force-close the file handles from an admin Command Prompt on the server:
- Open Command Prompt as Administrator (right-click Start, choose Command Prompt (Admin) or PowerShell (Admin)).
- Run
net fileto list all open files. You'll see a list with file IDs and paths. - Look for the file ID that matches the error. The ID in the error is in hex — convert it to decimal if needed. For example, if the error says ID 0x0000090A, that's 2314 in decimal.
- Run
net file ID /close(replace ID with the actual number). - Confirm with Y.
After you close that stale handle, the program should be able to open the file fresh.
Why This Happens
The error NERR_FileIdNotFound (0X0000090A) comes from the Windows network redirector (SMB client) or a server-side process. Your application calls a Windows API to open a file. Windows gives it a handle — a number that identifies the open file. If the handle gets closed on the server side (maybe the file was deleted, or a network issue dropped the connection, or another admin manually closed it), but your program still thinks the handle's valid, you get this error.
Common triggers:
- A backup application running while someone tries to open the same file
- A file moved or deleted while another user had it open
- A network transient (brief dropout) that silently closed the connection
- A program that caches file handles too aggressively
The real fix is to make sure your app requests a fresh handle by reopening the file, not assuming the old one still works.
Less Common Variations
Sometimes the error appears not on a file share but on a local program that uses Windows file mapping or CreateFile with a specific handle. In those cases:
- Corrupt application state: Close the program entirely, kill any lingering processes in Task Manager, then relaunch.
- Antivirus quarantine: Check your antivirus logs. Some AV software can close handles on files it detects as suspicious. Temporarily disable AV to test, but re-enable it after.
- Windows Update glitch: After some updates (especially Windows 10 1809 era), the SMB client can hang onto stale handles. Reboot the client machine, not just the server.
- Third-party file locking software: Tools like Unlocker or LockHunter can leave orphaned handles. Uninstall them and use built-in tools instead.
If you see this error on a database server (SQL Server, for example), it's often a sign that the database file handle got invalidated. Restart the database service rather than just the file service.
Prevention Tips
Once you've fixed the immediate issue, here's how to stop it from coming back:
- Update your network drivers. Outdated NIC drivers on the client or server cause random SMB disconnects. Check the manufacturer's site — skip Windows Update for this.
- Set SMB protocol to version 3. SMB 3 handles reconnection better. On the server, open PowerShell as Admin and run:
Set-SmbServerConfiguration -EnableSMB2Protocol $true(this enables SMB 2 and 3). - Increase the SMB session timeout. On the server, in Registry Editor, go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters. Create a DWORDSessTimeoutand set it to600(decimal). Reboot. This gives sessions 10 minutes before the server assumes they're dead. - Train users to close files properly. If you have users who walk away from a workstation with a file open, those handles are fragile. Encourage them to save and close before leaving.
- Monitor with Performance Monitor. Add the counter
Server\Open Filesand alert when it spikes or drops suddenly — that's a signal something's going wrong.
One last thing: if you're still stuck after all this, check if the file itself is on a DFS share or a clustered file server. Those setups have additional layers that can lose track of handles. In that case, contact your storage admin — it's above my pay grade.