Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8656029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:10:44+00:00 2026-06-12T15:10:44+00:00

I am trying to work with COM+ using c# and ASP.NET. I have been

  • 0

I am trying to work with COM+ using c# and ASP.NET. I have been following an example, however part of it fails.

dynamic oCatalog = Activator.CreateInstance(Type.GetTypeFromProgID("ComAdmin.COMAdminCatalog"));
/* Get the Applications collection and populate it */
dynamic applicationInstances = oCatalog.GetCollection("Applications");
applicationInstances.Populate();
foreach (dynamic applicationInstance in applicationInstances)
    {
        Response.Write("<p>" + applicationInstance.Name.ToString() + "-" + applicationInstance.Key.ToString() + "</p>");
        dynamic objComponents = oCatalog.GetCollection("Components", applicationInstance.Key);
        objComponents.Populate();
        foreach(dynamic Components in objComponents)
        {
            Response.Write("<p>" + Components.Name.ToString() + "</p>");
        }           
    }

When the above call oCatalog.GetCollection(“Components”, applicationInstance.Key) is called I get the error:

System.Reflection.TargetParameterCountException: Error while invoking
GetCollection.

How can I get a list of the current components in an application instance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:10:45+00:00Added an answer on June 12, 2026 at 3:10 pm

    You need to ask the “applications” collection for the components for an specific application:

    ICOMAdminCatalog2 oCatalog = (ICOMAdminCatalog2) Activator.CreateInstance(Type.GetTypeFromProgID("ComAdmin.COMAdminCatalog"));
    
    ICatalogCollection applications = oCatalog.GetCollection("Applications");
    applications.Populate();
    foreach (ICatalogObject applicationInstance in applications)
    {
        ICatalogCollection comps = applications.GetCollection("Components", applicationInstance.Key);
        comps.Populate();
        foreach (ICatalogObject comp in comps)
        {
            Console.WriteLine("{0} - {1}", comp.Name, comp.Key);
        }
    }
    

    for an example check here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686093(v=vs.85).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to develop my first site in ASP.Net using Web Forms. I have
Using this example: http://www.w3schools.com/php/php_ajax_database.asp I have set up a table echoing from database. I
So I am trying to work through the example here: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/SurfaceViewOverlay.html and on the
I'm starting a new web project using ASP.NET Webforms + EF4. I'm trying to
We have been using weborb for .net on an existing application for some time
I've been trying to work with the Yahoo Contacts API using the latest version
I am trying to understand the function at (http://www.w3schools.com/js/js_form_validation.asp) and rework it (below) using
I have an Asp.Net 2.0 (VB.Net) app and I'm trying to export a Control
I have the following url I need to support in my asp.net mvc project
I have a problem with DataPager with ListView, I am using ASP.NET with VB.NET.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.