BUG: Remote COM Calls Fail Because RPCSS is not Started

Last reviewed: March 18, 1997
Article ID: Q165300
The information in this article applies to:
  • Microsoft OLE Libraries 4.0 included with: - Microsoft Win32 Software Development Kit (SDK)

SYMPTOMS

On Windows 95 computers that have enabled remote connections to COM servers running on the computer, remote connection attempts to the machine fail with error RPC_SERVER_UNAVAILABLE if the only registered class objects are from single-threaded apartments.

CAUSE

The problem occurs because RPCSS.EXE(A system component) is not launched at the appropriate time.

RESOLUTION

You can work around this problem by pre-launching Rpcss.exe before any class objects are registered. A convenient place to do this is in the registry at HKLM\Software\Microsoft\Windows\CurrentVersion\Run (launches when the shell loads) or \RunServices (launches immediately upon machine boot, that is, before login). Add a named value (any name) and a value of "RPCSS.EXE".

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Rpcss.exe is not needed for local communication between COM objects, thus COM delays loading it until it is truly necessary. COM is able to launch Rpcss.exe correctly if:

  • The server is launched locally by COM.
  • The server is started manually but the first class registration is from a multi-threaded apartment (MTA, aka "free-threaded") server.
  • The server is launched manually, but the class object is registered in a suspended state (calling CoRegisterClassObject() with REGCLS_SUSPENDED flag).

However, Rpcss.exe is not launched reliably when a manually-started single- threaded apartment (STA) server is the first caller of CoRegisterClassObject.

Note that in server scenarios, COM only launches RPCSS if EnableRemoteConnection is set to Y.

There are other reasons a client application may not be able to communicate with a remote object:

  • DCOM is not enabled on either the client or server machine.
  • On Windows 95 server machines, remote connections have not been enabled.
  • On Windows 95 server machines, the server application has not been manually launched.
  • The client does not have appropriate permissions to communicate with the server.

You can determine whether an observed failure is caused by failure to launch Rpcss.exe by either checking whether the RPCSS process is running or manually starting Rpcss.exe before launching the server process.


Keywords : LeTwoDCom kbbuglist
Technology : kbole
Version : 4.0
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.