When This Error Hits
You're trying to connect to a remote server using PowerShell Remoting, or maybe you're running an RPC call from a C# app, and boom — you get the error RPC_NT_UNSUPPORTED_NAME_SYNTAX (0xC0020026). The exact message says "The name syntax is not supported."
I see this most often when someone tries to use a UNC path like \\server\share inside an RPC API call — especially with functions like RpcStringBindingCompose or RpcBindingFromStringBinding. It also happens with WinRM when you pass a computer name in the wrong format, like using a UUID string instead of a DNS name.
What's Really Happening
RPC uses different "name syntax" types. The most common is RPC_C_NS_SYNTAX_DEFAULT (value 0), but sometimes you get RPC_C_NS_SYNTAX_DCE (value 3) or something else. When you pass a string that doesn't match the expected syntax, RPC says "I don't understand this format" and throws error 0xC0020026.
Think of it like this: you're speaking English, but the RPC service expects Spanish. The words might be correct, but the structure is wrong.
The Fix: 3 Steps
Step 1: Check the name format
For most Windows RPC calls, you want to use the DNS format. For example:
Correct: server01.contoso.com
Wrong: {server01} or server01/ or \\server01
If you're using a UUID in the string binding, make sure it's in the standard format:
Correct: objectUUID=12345678-1234-1234-1234-123456789abc
Wrong: 12345678-1234-1234-1234-123456789abc (missing "objectUUID=")
Step 2: Set the syntax explicitly (if needed)
If you're writing code, explicitly set the syntax when calling RpcStringBindingCompose or RpcBindingFromStringBinding. Don't rely on defaults. Here's a C++ example:
RPC_WSTR StringBinding;
RPC_STATUS status = RpcStringBindingCompose(
NULL, // Object UUID (optional)
(RPC_WSTR)L"ncacn_ip_tcp", // Protocol sequence
(RPC_WSTR)L"server01.contoso.com", // Network address (DNS format)
(RPC_WSTR)L"1234", // Endpoint
NULL, // Options
&StringBinding);
if (status != RPC_S_OK) {
// Handle error — likely 0xC0020026 if name syntax is wrong
}
Step 3: Test with a different protocol
Sometimes the error is protocol-specific. If you're using ncacn_np (named pipes), switch to ncacn_ip_tcp for testing. Named pipes need a different name format (like \\server\pipe\name) that can trigger this error if you pass it to the wrong function.
If It Still Fails
Check the string binding more carefully. Common gotchas:
- You used a comma instead of a colon in the endpoint (like
1234,instead of1234) - The object UUID has a typo or wrong case — RPC is case-sensitive here
- You passed a GUID with braces
{}around it — RPC doesn't want those - The protocol sequence name is wrong (like
ncacn_ip_tcpmisspelled asncacn_it_tcp)
I've tripped over this error myself more times than I'd like. Usually it's something dumb like a missing colon or a stray backslash. Compare your string against Microsoft's example in the RPC String Binding documentation — it's saved me hours.