70-310, 320: Local DLL is used instead of COM Component

Discussion in 'MCAD' started by Ralf Hermanns, Aug 28, 2004.

  1. Please forgive me if this is stupid, but being new to COM, I cannot figure
    it out. I followed one examples in Mike Gunderloys 70-310 exam preparation
    book concerning component services.

    I created a serviced component in a class library project, signed it,
    installed (regsvcs) it to COM+ from the bin folder Visual Studio compiled it
    to. I did not put it in Global Assembly Cache, as the book suggest not to do
    at this stage.

    I then created a simple windows forms application, with a button to use my
    Component. I referenced and imported the dll project mentioned before, as
    instructed in the book. Works fine, but...

    Taking a closer look, I noticed that the compiler copied the component dll
    into the application folder (as VS does always with a referenced dll).
    Watching the output when running my test bed, I could see that this dll
    (same folder as .exe) was loaded, not the one at the place the dll was when
    I registered it to COM+.

    Finally, deleting the local copy of the dll from the applications folder did
    as feared: application cannot be started anymore... At this stage, the COM+
    Registration should have insured the dll could have been loaded from the
    place it was when I ran regsvcs, shouldn't it?

    COM+ is not used at all here in my case, the dll with all its fancy
    <Attribute...> stuff and registration is used as if it was a simple standard
    dll. Why is that? How to fix that behaviour? Does the GAC solve this?

    Thanks, Ralf
    Ralf Hermanns, Aug 28, 2004
    #1
    1. Advertising

  2. Ralf Hermanns

    Eric Guest

    Ralf Hermanns wrote:

    > Finally, deleting the local copy of the dll from the applications
    > folder did as feared: application cannot be started anymore... At
    > this stage, the COM+ Registration should have insured the dll could
    > have been loaded from the place it was when I ran regsvcs, shouldn't
    > it?


    The COM+ registration tells COM+ where to find the DLL, but it does not
    tell .NET where to find the DLL. .NET uses Fusion to locate the DLL -
    You can do some web searches for the Fusion Log Viewer to learn how to
    see what happens when .NET tries to load it.

    > COM+ is not used at all here in my case, the dll with all its fancy
    > <Attribute...> stuff and registration is used as if it was a simple
    > standard dll. Why is that? How to fix that behaviour? Does the GAC
    > solve this?


    It's not a standard DLL. COM+ has the Component Services framework
    around the component, and this adds a new layer of active managment
    options.

    If you put it in the GAC, the .NET will always be able to find it at
    runtime!

    Eric
    Eric, Aug 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vu Dang

    Re: 70-310 and 70-320

    Vu Dang, Jun 28, 2003, in forum: MCSD
    Replies:
    0
    Views:
    1,479
    Vu Dang
    Jun 28, 2003
  2. Some1

    mprapi.dll --> samlib.dll --> ntdll.dll issue.

    Some1, Apr 2, 2004, in forum: Computer Support
    Replies:
    4
    Views:
    2,175
    Some1
    Apr 5, 2004
  3. Snoopy
    Replies:
    16
    Views:
    2,953
    Mainlander
    Aug 25, 2003
  4. Lucas
    Replies:
    8
    Views:
    520
    Lucas
    Dec 22, 2003
  5. Ivan Smith

    70-320 / 70-310 COM+ content

    Ivan Smith, Jun 12, 2004, in forum: MCAD
    Replies:
    3
    Views:
    300
Loading...

Share This Page