Microsoft KB Archive/217351

From BetaArchive Wiki

PRB: DCOM Port Range Configuration Problems


The information in this article applies to:

  • Microsoft Windows NT Server versions 4.0, 4.0 SP4
  • Microsoft Windows NT Workstation versions 4.0, 4.0 SP4

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.


The following symptoms occur:

  • World Wide Web Publishing fails to start and the Event log reports:

Source:Service Control Manager
Description: The World Wide Web Publishing Service terminated with the following error: The endpoint can not be created.

  • Stopping the services, such as W3SVC, MSFTPSVC, SMTPSVC, SS LDAP, or SS Messaging fails with the error message:
  • DCOM clients connecting to the DCOM server fail with the error message:


This problem is caused either by improper configuration of port range settings through the HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\Internet registry key or by configuring the port restrictions for a protocol through the DCOMCNFG protocol property page.


WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

  1. If you do not want to configure DCOM to use a range of ports, delete the registry key and restart your computer.
  2. If you want to configure DCOM on your computer to use a range of ports, please go through the instructions in the paper Using Distributed COM with Firewalls and use the key HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\Internet to configure the range of ports.

    If you have used the DCOMCNFG utility to configure port restrictions, you might be running into the known DCOMCNFG bug. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    Q201911 BUG: DCOMCNFG Writes Ports Named Value in Incorrect Format.

    Instead, use Regedt32 to configure the port restrictions as described in the white paper.

    The number of ports to be opened depends on the number of DCOM applications and other services running on the computer. For example, each instance of a DCOM application process uses one port; Internet Information Server (IIS) uses a minimum of five ports.

    Also, it is important to determine the range of ports to be opened. For instance, SQL Server uses port 1433 for incoming requests and ports 1024-5000 for outgoing calls. Considering these factors, it is recommended that you open a minimum of 15 to 20 ports and use the port range that is above 5000. For example, configure DCOM to use port range 5000-5020.


Configuring the computer to use the range of ports has the side effect of breaking other applications on the system. The best alternative to this, on Systems with Microsoft Windows NT Service Pack 4 and above, is to configure the DCOM application to use the static end point using the AppId key.

Here are the steps to configure the DCOM application to use a static port using TCP/IP as the DCOM protocol:

On the Client Computer

  1. Run DCOMCNFG, go to the Default protocols tab, move connection oriented TCP/IP protocol to the top of the list, and restart the computer.

On the Server Computer

  1. Run DCOMCNFG, go to the Default protocols tab and move connection oriented TCP/IP protocol to the top of the list.
  2. Using tools, such as OLEVIEW, find your applications AppId GUID.
  3. Start the Registry Editor (Regedt32.exe).
  4. Locate the following key in the registry:
  5. On the Edit menu, click Add Value, and then add the following registry value:
  6. Quit the Registry Editor.
  7. Restart the computer.


For additional information regarding the mapping for the .exe name, click the article number below to view the article in the Microsoft Knowledge Base:

Q216051 FIX: DCOMCNFG NT 4.0 SP4 Does Not Write .exe Name under HKCR\APPID

Additional query words:

Keywords : kbOSWinNT400 kbOSWinNT400sp4
Issue type : kbprb
Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT400xsearch kbWinNTW400sp4 kbWinNTSsearch kbWinNTS400sp4 kbWinNTS400xsearch kbWinNTS400

Last Reviewed: October 27, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.