ANTS Profiler

Latest version: 4.3

ANTS Profiler

Knowledge Base

Profiling IIS web applications that need to run under the SYSTEM account

Category: Troubleshooting & error messages
Date: 17 Jun 2009
Product: ANTS Profiler
Versions: 3.1,3.2,4,5
Platforms: Internet Information Server 5.x/ASP .NET (any version)

When profiling a web application hosted in IIS, and the ASP .NET process model specifies the SYSTEM account, the warning message 'No .NET methods have been profiled' will be displayed when taking a snapshot or closing the browser. ANTS Profiler does work properly when the ASP .NET worker process runs as the ASPNET (MACHINE) or any named user.

ANTS Profiler needs to attach the profiling API to the user which will run managed ASP .NET code, unlike profiling a desktop, COM+, or service application, in which the profiling API is attached to a process. The name of the user that will run the ASP .NET worker process on IIS 5 (aspnet_wp.exe) is determined by examining the machine.config file stored in the config subfolder for the version of ASP .NET that is configured for the web application being profiled. This user can be any local or domain account, as well as the 'special' users: MACHINE and SYSTEM. The default setting is MACHINE with a password of AUTOGENERATE (it is controlled by Windows). If, however, the processModel section of machine.config is set to SYSTEM, which will cause ASP .NET to run as the local SYSTEM account, ANTS Profiler will fail to connect to the ASP .NET worker process and no .NET methods will be profiled.

It's not recommended to run ASP .NET web applications under the SYSTEM account because of security risks. However, if there is a necessity for this, the following workaround will allow you to profile ASP .NET running as SYSTEM.

First, right-click My Computer and select Properties. Next, click the Advanced tab and click Environment Variables.
In the System variables, add two new entries:

Name: COR_ENABLE_PROFILING Value: 1
[ANTS Profiler version 3.x]
Name: COR_PROFILER Value: {9AE7D44D-DE91-47cb-9ABA-84BCAA0E5F54}

[ANTS Performance Profiler version 4.x]
Name: COR_PROFILER Value: {A07CBDF0-B23B-4A96-A889-18E3C3004EB2}

[ANTS Memory Profiler version 4.x]
Name: COR_PROFILER Value: {4befac55-31fa-4cf0-84b7-327248147851}

[ANTS Memory Profiler version 5.x]
Name: COR_PROFILER Value: {D60F7519-2600-4865-8AC1-C621C9CE41A2}

[ANTS Performance Profiler version 5.x]
Name: COR_PROFILER Value: {60E3DCF2-1A65-4a44-9F41-038582C8181C}

Then start ANTS Profiler and profile your web application hosted in IIS. As soon as you are done, set the COR_ENABLE_PROFILING to 0. This will disable hooking the profiling API into processes that are started by the SYSTEM account.

Document ID: KB200708000140 Keywords: ANTS,Profiler,no,methods,system,processmodel,ASP,COR_PROFILER

Was this article helpful?

Search support
Forums
Visit the ANTS Profiler forum.

ANTS Profiler

all products