0XC00D132C

NS_E_CURL_INVALIDPORT Fix: Stop Guessing the Right Media Port

Windows Media Player or apps hit this when a URL's port is empty, out of range, or non-numeric. Fix the link or adjust the app's proxy/streaming settings.

You're trying to open a network stream in Windows Media Player—maybe an IP camera feed, a radio station, or a custom URL from a friend—and instead of audio or video you get a dialog that reads NS_E_CURL_INVALIDPORT with the code 0XC00D132C. The stream URL looks fine in a browser, but WMP refuses it. This also happens in older Windows Media Center setups and in some third-party apps that use the Windows media foundation stack.

What's actually happening here is that the URL you supplied has a port component that Windows' media stack can't parse. The port isn't just a number—it's a number between 1 and 65535. If the port is empty, negative, contains letters, or exceeds 65535, the underlying URL parser throws exactly this error. The browser is lenient and guesses default ports, but the media stack isn't. It wants a clean, valid port or no port at all.

Why does this happen?

The Windows media pipeline uses the Internet Explorer URL parser under the hood, and that parser is strict about port formatting. It expects the port to be a decimal integer without leading zeros beyond the first digit. So http://example.com:8080/stream is fine, but http://example.com:80a/stream or http://example.com:/stream will trigger the error. Even http://example.com:99999/stream fails because the port is out of range.

Another common trigger is when a URL includes a port that was meant for a different protocol—like using port 443 for an RTSP stream. The parser still validates the number, but if the service isn't listening there, you might see this error before a connection timeout. The error is about syntax, not connectivity, so don't waste time checking your firewall first.

The fix: Make the port valid or remove it

Here's the order I'd attack this in. Most of the time it's a typo or a wrong assumption about what the URL should look like.

  1. Inspect the exact URL. Copy the full address into Notepad. Look for a colon followed by anything that isn't a pure number. If you see :abc, : with nothing after, or more than five digits, that's your problem. Fix the port to an integer between 1 and 65535.
  2. Remove the port if it's unnecessary. For HTTP and HTTPS, the default ports are 80 and 443. If the URL has :80 or :443 and nothing else is wrong, just delete the port entirely. The same applies to RTSP—it defaults to 554. Writing rtsp://camera.local/stream is safer than rtsp://camera.local:554/stream because some parsers get confused with protocol-default ports.
  3. If the port is correct but the error persists, check for a hidden character. This is rare but real—copy-pasting from a webpage can bring in a zero-width space or a non-breaking space right before the port. In Notepad, enable View → Show Symbol → Show All Characters (or just press Ctrl+Shift+8) and look for a dot where a space shouldn't be. Delete it and retype the colon.
  4. For streaming apps that hardcode a URL—like an IP camera viewer or a radio tuner—check the app's settings for a separate port field. Some apps split the URL into host and port inputs. If you paste a full URL into the host box, you'll get this error because the app appends its own port. Instead, put just the IP or hostname in the host field and put the port number in the dedicated port box.
  5. On Windows 10/11, if the URL comes from an M3U or ASX playlist file, open the file in a text editor. Playlist files often wrap URLs in XML or use relative paths. If the file has a malformed <ref href="rtsp://...:99999" />, the player will report this error. Edit the file to correct the port or remove the line if it's not needed.

Still failing? Here's the deeper check

If every URL you try gives you this error—even clean ones with no port—then the problem isn't the URL. It's the registry setting that controls the maximum allowed port range on your machine. Some security software or a previous misconfiguration can restrict the valid port range.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v "MaxUserPort" /t REG_DWORD /d 65534 /f

Run that in an elevated Command Prompt, then reboot. But be careful—this changes a global TCP setting, and it's rarely the actual fix for a media URL error. I've only seen this be the culprit on machines where someone previously locked down ports for security and forgot about it. The error would then appear on all network operations, not just streaming.

Also check your proxy settings. If you have a system proxy configured (Settings → Network & Internet → Proxy), and the proxy address itself has a malformed port, every URL you open goes through that proxy and inherits the invalid port. Turn off the proxy temporarily to test. If the stream works without the proxy, fix the proxy's port entry.

What if the error comes from a custom app?

If you're writing a small script or app that calls IMFSourceResolver or similar, the error is your own code's fault. You're probably building a URL with string concatenation and not validating the port. Windows provides a helper function UrlEscape and the IUri interface, but the practical fix is to validate the port before you pass it:

function IsValidPort(port) {
    return Number.isInteger(port) && port > 0 && port <= 65535;
}

If that returns false, don't even try to open the URL. Show a friendly message instead of letting the OS throw this cryptic error.

The root cause is almost always a typo or a misunderstanding of what the URL should contain. Fix the port, and the error disappears. If it doesn't, suspect the proxy or a corrupted media foundation cache—clearing the cache under %LOCALAPPDATA%\Microsoft\Media Player sometimes helps after a Windows update. But start with the URL, because nine times out of ten, that's where the problem lives.

Related Errors in Windows Errors
0X8004020E COM+ Error 0x8004020E: Can't Delete Configured Object Fix 0XC0000248 STATUS_LOGIN_WKSTA_RESTRICTION: Fix 0xC0000248 Fast 0X80290200 Fix TBSIMP_E_BUFFER_TOO_SMALL (0X80290200) on Windows 10/11 0XC00D10DA Fix Windows Media Player burn error 0XC00D10DA

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.