我正在寻找以编程方式修改Com + Component Property的解决方案 - >对“不支持”的交易支持
手动步骤如下:
Component Services
对话框(comexp.msc
)Component Services
- > Computers
- > My Computer
COM+ QC Dead Letter Queue Listener
Components
QC.DLQListener
并打开此组件的上下文菜单,然后选择属性Transactions Support
设置为Not Supported
答案 0 :(得分:1)
在我花了几个小时来解决这个问题之后,我终于得到了一个关于C#的解决方案。
我从以下文章中获得了很多见解:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COMAdmin;
namespace SetComPlusTransactionsToNotRequired
{
class Program
{
static void Main(string[] args)
{
COMAdminCatalog catalog;
COMAdminCatalogCollection applications;
// Get the catalog
catalog = new COMAdminCatalog();
// Get the list of all COM+ applications contained within this catalog
applications = (COMAdminCatalogCollection)catalog.GetCollection("Applications");
applications.Populate();
foreach (COMAdminCatalogObject application in applications)
{
if (application.get_Value("Name") == "COM+ QC Dead Letter Queue Listener")
{
COMAdminCatalogCollection components;
components = (COMAdminCatalogCollection)applications.GetCollection("Components", application.Key);
components.Populate();
foreach (COMAdminCatalogObject component in components)
{
Console.WriteLine("Component: " + component.Name);
component.set_Value("Transaction", COMAdminTransactionOptions.COMAdminTransactionNone);
}
components.SaveChanges();
}
}
}
}
}