We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • Question regarding unexpected serialised COM+ calls

    Aug 20, 2007 12:51 PM|theshadow330|LINK

    Can someone please explain why I'm seeing serialised calls to a COM+ application under the following conditions:

    • <div mce_keep="true">COM+ object written in C# compiled under .NET v2.0</div>
      • <div mce_keep="true">Exposes a method DoWork() via standard COM wrapper</div>
        • <div mce_keep="true">This method simply calls Thread.Sleep(x) where x is a value passed to the method. This is intended to mimic work being done.</div>
      • <div mce_keep="true">Has object pooling enabled for the object (with 5 instances)</div>
      • <div mce_keep="true">The application has a pool size of 1.</div>
    • <div mce_keep="true">IIS 6</div>
      • <div mce_keep="true">Running on Windows Server 2003 SP1</div>
      • <div mce_keep="true">An application pool running as LOCAL SERVICE</div>
      • <div mce_keep="true">1 worker process</div>
      • <div mce_keep="true">A single virtual directory belongs to the above application pool.</div>
        • <div mce_keep="true">This directory contains my .asp which will be called later</div>
      • <div mce_keep="true">AspExecuteInMTA is set to 0 for every node in the metabase (this is how IIS installs)</div>
    • <div mce_keep="true">ASP page that...</div>
      • <div mce_keep="true">accepts an integer querystring param that is passed to the DoWork() method indicating how many seconds to "sleep" for</div>

    Now, using two browser windows, I load the above page using a sleep time of 10 seconds for window A and a time of 1 second for the window B. Window A is loaded first. The result is that window A takes 10 seconds to load. Window B takes 11 seconds. During this time, stats in COM+ show only a single instance of the COM+ object running.

    However, if I change the Application Pool in IIS to run as a NETWORK SERVICE, both pages load at the same time, and one sees 2 instances of the COM+ object running at once.

    Why the difference?

    Thanks, Andrew

    iis com+ threading serailised serialized asp