PRB: DCOM Port Range Configuration Problems
ID: Q217351
|
The information in this article applies to:
-
Microsoft Windows NT 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.
SYMPTOMS
The following symptoms occur:
CAUSE
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.
RESOLUTIONWARNING: 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, you should also update your Emergency
Repair Disk (ERD).
- If you do not want to configure DCOM to use a range of ports, delete the registry key and restart your computer.
- 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.
MORE INFORMATION
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 - 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- Run DCOMCNFG, go to the Default protocols tab and move connection oriented TCP/IP protocol to the top of the list.
- Using tools, such as OLEVIEW, find your applications AppId GUID.
- Start the Registry Editor (Regedt32.exe).
- Locate the following key in the registry:
HKEY_CLASSES_ROOT\AppId\{appid guid}
- On the Edit menu, click Add Value, and then add the following registry value:
Value Name: Endpoints
Data Type: REG_MULTI_SZ
Value: ncacn_ip_tcp,0,<port number>
where <port number> is the static port that you would like to use.
- Quit the Registry Editor.
- Restart the computer.
Note that your application might not pick up the static end point from the registry if the mapping for the .exe name to the AppId does not exist in the registry.
REFERENCESFor 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 : kbNTOS400 kbNTOS400sp4
Version : winnt:4.0,4.0 SP4
Platform : winnt
Issue type : kbprb
|