How to fix Error 1791 on Windows 11

Troubleshooting Guide: RPC Error 1791 on Windows 11

Why This Error Happens

Error 1791 (“A remote procedure call is already in progress for this thread”) occurs when a single thread attempts to initiate a new RPC call before a previous one has completed or released its binding handle. This typically results from application code or a service mismanaging concurrent RPC sessions, often compounded by corrupted DLL registrations or stalled Active Directory/domain communication processes. Network latency or Group Policy processing conflicts on Windows 11 can also trigger this by causing RPC threads to queue improperly.

Step-by-Step Resolution Guide

Step 1: Restart Core RPC-Dependent Services

  • Open the Services console by typing services.msc into the Run dialog (Win + R).
  • Locate Remote Procedure Call (RPC) and confirm it is set to “Running” and Startup Type is “Automatic.”
  • Restart the DCOM Server Process Launcher and RPC Endpoint Mapper services, as these often hang during conflicting calls.
  • If the service is unresponsive, restart the machine to clear the stuck thread state entirely.

Step 2: Re-register Core System DLLs

  • Open Command Prompt as Administrator.
  • Run the following commands sequentially to fix corrupted RPC-related library registrations:
  • regsvr32 rpcrt4.dll
  • regsvr32 rpcss.dll
  • Reboot the system after registration completes to apply the changes.

Step 3: Check Group Policy and Domain Connectivity

  • If the machine is domain-joined, run gpupdate /force in Command Prompt to rule out a stalled policy thread as the cause.
  • Verify DNS resolution to the Domain Controller using nslookup <DomainControllerName>.
  • Check the Event Viewer (Windows Logs > System) for correlating DCOM or Kerberos errors occurring at the same timestamp as Error 1791.

Step 4: Update or Roll Back Problematic Application

  • If the error is tied to a specific third-party application (rather than the OS itself), check the vendor’s site for a patch addressing RPC threading bugs.
  • Alternatively, use Settings > Apps > Installed Apps to roll back to a previous version if the issue started after a recent update.

Alternative or Verification Steps

  • Verification: Open Event Viewer and confirm no new instances of Event ID 1791 appear under “System” logs after reproducing the action that originally caused the crash.
  • Alternative Fix: If the error persists specifically during login or domain authentication, temporarily disconnect the VPN or switch network adapters, as split-tunneling can sometimes cause simultaneous RPC handle requests that trigger this specific thread lock.