70-320 Wrong answer II

Discussion in 'MCAD' started by imago, Apr 22, 2006.

  1. imago

    imago Guest

    I got confused from the below question which has 2 different answers?
    Can any1 explain me the right one?
    ---------------------------------------------------------------------------------------------------------------------------------
    Q25.

    You create a serviced component named SessionDispenser. This computer
    is in the
    Fakrikam.Utilities assembly and is registered in a COM+ server
    application. SessionDispenser has multiple callers.
    You discover that there are logic problems in the Create New Session
    method. You want to
    debug any calls to this method.
    What should you do?

    A. Open the SessionDispenser solution.
    Set a breakpoint on the CreateNewSession method.
    Start the debugger.
    B. Attach the debugger to the client process.
    Set a breakpoint on the SessionDispenser.CreateNewSession method.
    C. Attach the debugger to the Fabrikam.Utilites.exe process.
    Set a breakpoint on the CreateNewSession method.
    D. Attach the debugger to a Dllhost.exe process.
    Set a breakpoint on the CreateNewSession method.

    Answer: C.
    -----------------------------------------------------------------------------------------------------------------
    QUESTION 2

    You create a serviced component named SessionDispenser. This computer
    is in the TestKing.Utilities assembly and is registered in a COM+
    server application. SessionDispenser has multiple callers. You discover
    that there are logic problems in the Create New Session method. You
    want to debug any calls to this method.
    What should you do?

    A. Open the SessionDispenser solution.
    Set a breakpoint on the CreateNewSession method.
    Start the debugger.
    B. Attach the debugger to the client process.
    Set a breakpoint on the SessionDispenser.CreateNewSession method.
    C. Attach the debugger to the TestKing.Utilites.exe process.
    Set a breakpoint on the CreateNewSession method.
    D. Attach the debugger to a Dllhost.exe process.
    Set a breakpoint on the CreateNewSession method.

    Answer: D

    Explanation/Reference:
    Explanation: Since this is a COM+ SERVER application we have to attach
    the debugger to the Dllhost.exe.

    Reference: .NET Framework Developer's Guide, Using Serviced Components
    with the Global Assembly Cache

    Incorrect Answers
    A: The debugger must be attached to the program that should be
    debugged.
    B: The debugger should be attached to Dllhost.exe, not to the client
    process.
    C: We are not debugging a Library application, so we should not attach
    the debugger to the TestKing.Utilities.
    exe process.
     
    imago, Apr 22, 2006
    #1
    1. Advertisements

  2. imago

    Simon Hart Guest

    You need to study Enterprise Services.

    A server activated package run's in a separate surrogate "dllhost.exe" under
    Windows 2000 and onwards or "mts.exe" if under NT but .NET Enterprise
    Services do not support Windows NT anyway.

    So the only way you can debug your code, is to attach a debugger to the
    surrogate and put a break point in the source for that class/method you want
    to debug, then call it from a client application.

    If the question read a library application instead of server, then you could
    just run the appliation via the debugger (VS.NET) then step into the code as
    the component will be loaded into the callers context not a separate
    surrogate.

    Simon.
     
    Simon Hart, Apr 22, 2006
    #2
    1. Advertisements

  3. imago

    imago Guest

    Hi Simon,

    Tanx in advance. Ur explanation was really helpful. But, thing is I
    didnt get you clearly what should be the answer for the above two
    questions? Let me know.
     
    imago, Apr 25, 2006
    #3
  4. imago

    Simon Hart Guest

    If you can't select the correct answer from my explanation then you are
    clearly not ready to take the exam. From the question I take it you are
    taking 70-320.

    Lookup COM+ or Enterprise Services on MSDN, you need to understand at least
    the basics in order to pass.

    Simon.
     
    Simon Hart, May 1, 2006
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.