DOCUMENT:Q171456 17-JUL-1997 [vbwin] TITLE :PRB: Run-time error -2147023071 (80070721) using WithEvents PRODUCT :Microsoft Visual Basic for Windows PROD/VER:5.0 OPER/SYS:WINDOWS KEYWORDS:kberrmsg vb5all ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions for Windows, version 5.0 --------------------------------------------------------------------- SYMPTOMS ======== When using an ActiveX component that defines events, you may receive the following error when this component is accessed via DCOM. "Run-time error -2147023071 (80070721) Automation Error" This error does not occur if the ActiveX component is used locally or if the client does not instantiate the remote object using the WithEvents statement. CAUSE ===== The cause of this behavior is the configuration of the DCOM Server's security options. RESOLUTION ========== To fix this problem, the security options for the Microsoft Windows NT DCOM server must be set appropriately. To make these changes, follow the steps below: NOTE: This procedure requires administrative access to the Microsoft Windows NT system that is active as the DCOM server. 1. Install the Server and the Client components as per the installation instructions. This will register the components on the appropriate systems. 2. On the system that is to act as the DCOM server, click Run from the Start menu. In the Open field, type "DCOMCNFG.EXE" (without quotes). Click OK. 3. Select the ProgID or GUID that represents the component you wish to configure. Click Properties. 4. In the Identity section, select 'The Interactive User' option. 5. Change the other security options to their desired settings. REFERENCES ========== For additional information, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q161837 TITLE : HOWTO: Create a DCOM Client/Server Application ====================================================================== Keywords : kberrmsg vb5all Version : 5.0 Platform : WINDOWS Issue type : kbprb ============================================================================= 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. Copyright Microsoft Corporation 1997.