I am looking for a solution to programmatically modify Com+ Component Property -> Transaction Support to “Not Supported”
The manual steps are the following:
Component Services
dialog (comexp.msc
)Component Services
-> Computers
-> My Computer
COM+ QC Dead Letter Queue Listener
Components
inside the opened componentQC.DLQListener
and open context menu for this component and select propertiesTransactions Support
to Not Supported
After I spent several hours on this problem, I've finally got a solution on C#.
I've got a huge insight from the following articles:
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();
}
}
}
}
}