comadmin

How do I restart a COM+ application on a remote server from .NET?

寵の児 提交于 2019-12-23 19:58:04
问题 How do I programmatically restart a COM+ application running on a remote server from code in .NET? 回答1: You have to use the ComAdmin API through COM interop. Put a reference on Windows\System32\Com\ComAdmin.dll, then: COMAdmin.COMAdminCatalog catalog = new COMAdmin.COMAdminCatalogClass(); catalog.Connect(servername); catalog.ShutdownApplication(AppNameOrAppID); You can find the ComAdmin reference in MSDN here. It's a COM API, and kind of wierd. Eg. you cannot instantiate a COMAdminCatalog,