Partilhar via


IIS Debugging Quiz - Answer

Okay, it's time to enlighten things about my IIS debugging experience. Jeff was quite near at the solution when thinking about some issues with the worker process. Actually the day before I did this demonstration I played around a little bit with the process model of IIS 6.0. You probably know that IIS 6 supports web gardens. Web gardens actually enable you configuring an application pool so that it starts more than one process. These processes share the work load for applications configured in the application pool. This is especially cool if you have more CPUs installed on your web server box as every process can be configured to run on a separate CPU for a better workload-sharing (the CPU mask can be configured through editing the metabase directly, only – the property is called SMPProcessorAffinityMask which is a part of the IIsApplicationPool configuration and therefore can be found at /LM/W3SVC/AppPools/YourAppPoolName).

Okay, so what’s with debugging? Unfortunately after I have played with web gardens I have forgotten to reset the settings for my application pool. And with that IIS starts as much processes as configured for the web garden setting in the IIS management console. Therefore when I started debugging with VS, it attached to the first available process of the application pool for debugging. But then IIS started some additional processes (I have configured the web garden setting for 3 processes; therefore 3 processes were running for my application pool). As VS attaches only to one process and IIS decides which process gets the request based on the work load, sometimes the first process, sometimes the second and sometimes the third worker-process processed my request. Therefore every time when the first process was hit, my breakpoint was hit as well (as VS attached to the first process).

Any other time of course my break point wasn’t hit because VS just don’t attach automatically to the other process (I mean it cannot do that because it gets even better: the additional processes might be launched even after you launch your debugging session as IIS decides when to launch them based on the work load).

This might just be one hint for you if you experience the same problem;-)...

Comments

  • Anonymous
    April 26, 2005
    Aha, now that was something I didn't think of but makes sense. I have still yet to enable Web Gardens, I know about them and have experimented with them. However, I know from past experiences with Classic asp sessions were not managed correctly with multiple CPUs and well 6-7 years of classic asp programming means a lot of code to replace with .net to get completely in a .net environment to turn on web gardens. I have never found any info on web gardening and keeping classic asp compatable. I have been using it on like the Biztalk server and any web services and stuff there but for full websites on the main websever still a lot of Classic ASP. Have you ever found any info on how Web Gardens affect Classic ASP.

  • Anonymous
    May 31, 2009
    PingBack from http://patiochairsite.info/story.php?id=1137

  • Anonymous
    June 18, 2009
    PingBack from http://gardendecordesign.info/story.php?id=2738