4

I have a legacy DCOM server and client application both written in Delphi v6. The DCOM server is currently configured to run once and service all clients. The main reason for it running once is that the server provides an interface to an accounts application and must logon and can only do this once for a given user name.

Our customer now wants to upgrade their server to Windows Server 2008 R2 leaving the clients on Windows XP but I have been unable to replicate the current set-up.

The current set up that I can get to work on a test rig is slightly odd!

  1. I have to configure DCOM settings to allow remote launch or I get access denied on the client
  2. If the DCOM server is not already running, when the client tries to connect to it I get server execution failed.
  3. If the server is running and the launch permission is set to allow remote launch, the client starts a new instance of the DCOM server rather than using the instance already started. This then causes problems in the accounts application as the same user tries to logon which is not allowed.
  4. If I close the DCOM server running on the server, the client happily works away with its own instance. I cannot see the DCOM servers main form though as its running in the background (can see it in task manager)

I've found various articles to do with this problem but nothing so far has worked. These include running the DCOM server as administrator, not running the DCOM server as administrator, allowing COM+ in the firewall, adding the DCOM server to the firewall, the DCOM server located in SysWOW64, using the 32 bit version of DCOMCNFG, etc.

Now not sure where to go...

Thanks for any help

Simon

4

1 に答える 1

3

XP SP2 および 2003 SP1 では、DCOM の既定のアクセス許可が変更されました。サービスを適切に実行するには、 を適切に構成する必要があります。通常、DCOM サーバーをサービスに実装しない限り (DCOM サポートが限られているため、Delphi では許可されません)、ユーザーが接続すると DCOM サーバーが開始されるため、「リモート起動」権限が必要になる場合があります。さらに、DCOM サーバーは、特定のユーザー、対話型ユーザー (リモート クライアントでは避ける必要があります!)、または起動ユーザーのコンテキストで起動される場合があります。どのモードを使用していますか? - 「launching user」に設定されている場合、常に新しいインスタンスが作成されます。新しい OS の前に、サーバーはどのようにインスタンス化されていましたか? そのクラス ファクトリはどのように実装されていますか? DCOM と Delphi の実装に関する興味深い情報については、こちらを参照してください。

ところで:

  • 本当に必要な場合を除き、管理者権限で DCOM サーバーを実行しないでください。そうしないと、セキュリティ ホールが作成される可能性があります。
  • ファイアウォールが存在する場合、RPC エンドポイント ポートと DCOM 用に構成されたポートの両方を、呼び出し元のクライアントに対して開く必要があります。
  • アプリケーションでシステム ディレクトリを台無しにしないでください。アプリがそこでのみ動作する場合は、権限の構成に誤りがあり、属していない場所にファイルを配置しても適切に解決されません。
于 2012-05-03T08:52:49.343 に答える