Fix RPC_S_STRING_TOO_LONG (0X000006CF) – String Too Long Error
This error means a string passed to an RPC call exceeds the limit. Common in Active Directory and DFS. Here's how to kill it.
The 30-Second Fix: Check What You're Passing
This error pops up when a string you're sending to a Remote Procedure Call is over the 280-character limit. Nine times out of ten, it's a DFS path or an Active Directory attribute that's been stuffed with a ridiculously long name or description.
First thing: Look at the exact string that triggered it. If you're running a command like dfsutil or netdom, the output usually shows the failing path. Shorten it. Rename the folder, truncate the description, or use a shorter UNC path. That's it. You're done in under a minute.
If the error came from an application like a backup tool or a management console, go into its configuration and trim any long paths or names you entered.
Still seeing it? Move on.
The 5-Minute Fix: Check the Registry for Path Length Limits
Windows has a hidden limit for RPC string lengths that can be bumped up. But don't go crazy — setting it too high can cause memory issues. We're only adjusting the specific parameter that controls string length.
Open Regedit and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RpcSs\Parameters
If the RpcSs key doesn't exist under Services, create it. Then create a new DWORD (32-bit) value called MaxRpcSize. Set it to 65535 (decimal). That gives you 64KB for RPC strings — more than enough for 99% of cases.
Reboot the server after making this change.
Still no luck? This is usually the fix for DFS namespace issues, so if it didn't work, you've got something else going on.
The 15-Minute Fix: Dig into the Actual Call
You're dealing with a specific application or AD object that's passing a monster string. Time to track down what's sending it.
1. Use the Event Viewer
Open Event Viewer and go to Applications and Services Logs > Microsoft > Windows > RPC. Look for event ID 1723 — that's the one tied to string length failures. The event details will usually tell you the RPC interface UUID and possibly the operation code. Note those down.
2. Enable RPC Debug Logging
This one's a bit heavy but gives you the full picture. Run this as admin:
wevtutil set-log "Microsoft-Windows-RPC/Debug" /enabled:true /retention:false /maxsize:2097152
Reproduce the error, then check the debug log in the same Event Viewer path. Look for entries with StringTooLong or 0x6CF. The log shows the exact string that failed.
3. Check Active Directory Object Attributes
If this is an AD replication or attribute error, use ADSI Edit to check the description, displayName, name, or any other attribute that might be over 256 characters. The error code maps to a limit in the RPC runtime, not the AD schema — but AD does have its own limits for certain attributes (like 1024 chars for description). If it's over 1024, that's your culprit.
Use PowerShell to query the object:
Get-ADUser "username" -Properties * | Select-Object name, description, displayName, @{N="DescLen";E={$_.description.Length}}
Any attribute with Length > 280 is your problem. Either shorten it or remove the value entirely.
4. Last Resort: Network Trace
If you're still stuck, fire up Wireshark and filter for rpc. Reproduce the error. Look for the RPC bind or request packet that gets a fault response. The fault code will be 0x000006CF. Expand the packet and look at the string fields. You'll see the offending data right there.
This is overkill for most people, but when you've got a custom app or a complex environment, it's the only way.
What NOT to Bother With
Don't waste time on these:
- Disabling firewalls. Firewalls don't cause string length errors.
- Rebuilding the RPC service. It's not corrupted.
- Running SFC /ScanNow. System file corruption doesn't cause this.
- Changing the RPC port range. Port exhaustion is a different beast.
Stick to the three steps above. You'll fix it.
Was this solution helpful?