Monitoring ASP.NET Managed Code

ASP.NET code is monitored by using the PurifyPlus ASP.NET profiling monitor, AspNetMon.exe. This monitor enables profiling for managed code running in the context of ASP.NET or as a Web Service.

The monitor is implemented as a Windows system tray icon. To start the monitor, run AspNetMon.exe (typically found in C:\Program Files\IBM\RationalPurifyPlus\Common). After the monitor is started, a small traffic light icon appears in the system tray area of the Windows taskbar. The red light indicates profiling is disabled for all PurifyPlus components. The green light indicates profiling is enabled for one of the components (Purify, Quantify, or Coverage). Hover the mouse cursor over the monitor icon to view the current monitor status (enabled or disabled), and the component name for which profiling is enabled (Purify, Quantify, or Coverage).

To change the monitor status, right-click the monitor icon in the system tray. A popup menu displays the following choices:

§  ASP.NET Monitoring Disabled

§  Enable ASP.NET Monitoring for Quantify

§  Enable ASP.NET Monitoring for Coverage

§  Enable ASP.NET Monitoring for Purify

Choose "ASP.NET Monitoring Disabled" to disable profiling for all PurifyPlus components, or choose "Enable ASP.NET Monitoring for <componentName>" to enable profiling for one of the PurifyPlus components.

 

Once started, the monitor will continue to run until the operating system is rebooted. To start the monitor automatically, place a shortcut to AspNetMon.exe in the startup folder of the All Users > Start Menu.

In order to obtain data for your ASP.NET application, you need to either take a snapshot from the Purify (or Quantify or PureCoverage) GUI or disable the monitor as described above.

 

Notes:

§      ASP.NET implementation on Windows XP and Windows 2003 Server is different. On Windows XP managed ASPX code is hosted by so called "ASP Net Worker Process" (aspnet_wp.exe), while on Windows 2003 managed code is hosted by the "WWW Worker Process" (w3wp.exe). There is not much difference between these two worker processes except for the name. We support both.

§      It is better to start AspNetMon.exe from an account with administrative privileges. Otherwise it becomes subject to multiple security restrictions.

§      There is no remote mode for PurifyPlus. It should be properly installed and running on the server machine. Usually monitoring is enabled by AspNetMon.exe being started on the server machine.

§      It is a good idea to limit the information collected by using prefiltering. In the Default Settings or Executable Settings dialog click on the PowerCheck tab. Then click the Configure button in the Managed box. You will see the prefiltering dialog that controls which classes should be monitored. You may exclude classes you don't want to monitor or just select classes of interest. In your case you may choose 'selected classes' and include the namespace implemented in the target assembly in the target pattern.

§      When profiling an ASP.NET 2.0 application, make sure you run the server-side code in "High Security" or "Isolated" mode. To switch to this mode, start the system management console, select "Services and Applications/Web Sites/Default Web Site" or any specific web site you want to configure, right click on it and select "Properties" in the context menu. In the "Web site properties" dialog select the "Home Directory" tab. Click on the "Application Protection" drop box and select "High (isolated)". Click "OK" and restart your IIS server. This change has to be done only once. After that you should be able to use AspNetMon.exe to enable/disable profiling of ASP.NET applications.

(C) Copyright IBM Corporation 1993, 2010.