ANTS Performance Profiler - 6.3
Profiling ASP.NET applications running on IIS - ANTS Performance Profiler
To profile ASP.NET applications running on IIS, on the ANTS Performance Profiler Settings dialog box, perform the following steps:
- Under Choose application type to profile, click ASP.NET web application (IIS).
- Select the ASP.NET web application (URL) for the root directory of the web application that you want to profile.
To load a list of currently-running sites from IIS into the dropdown list, click
.Note that the port specified in this URL is the port where the application usually runs under IIS, which is not necessarily the same as the port where the application is to be profiled (see step 4).
- Select the required Profiling mode, SQL and file I/O, and Profile child processes options; see Working with Application Settings.
- ANTS Performance Profiler will detect the version of IIS installed on your computer:
- If you are using IIS 5, ANTS Performance Profiler will profile your application on its original port. This will automatically restart IIS.
- If you are using IIS 6 or IIS 7, you can choose to profile on the original port or on an unused port:
Select Unused port if your application does not bind to a specified port. ANTS Performance Profiler will start a new instance of your application on the specified port, avoiding a restart of IIS. The port where the application will be profiled is displayed at the bottom of the ANTS Performance Profiler Settings dialog box.
Select Original port if your application's code binds to a specific port. ANTS Performance Profiler will stop your application, attach to it, and restart it on the original port.
Note that restarting IIS stops IIS and only restarts the application that you are profiling. Other sites running on the same IIS instance (including any other sites on which your web app depends) will not be present when IIS restarts.
If your application takes too long to start, IIS might not restart correctly. Use IIS Manager to stop the website manually until you have finished profiling.
- If required, select Manually specify ASP.NET account details and enter the User name, Password and (in IIS6 and 7) Domain.
With IIS 5, ANTS Performance Profiler can only run as the ASPNET user: ensure that this user has permission to read from %ProgramFiles%\Red Gate\ANTS Performance Profiler 6\ProfilerCore.dll
If your Application Host configuration file is set to protect the credentials of the ASPNET user, ANTS Performance Profiler may be unable to detect them. In this case, select Manually specify ASP.NET account details and enter the ASPNET username and password.
With IIS 6 or IIS 7, ANTS Performance Profiler profiles your web application as the Windows Local System user by default. This is appropriate for most websites.
However, if your web application connects to a remote server (such as a database server), the Windows Local System user might not have appropriate permissions to make the remote connection. In this case, enter the credentials of a user who does have the required permissions. Note that the user you specify must be an administrator, and must have permission to read from %ProgramFiles%\Red Gate\ANTS Performance Profiler 6\ProfilerCore.dll
- If required, change the performance counters to record; see Setting up Charting Options.
- Click
.

Note that port selection options are not displayed when profiling with IIS 5.
ANTS Performance Profiler launches the IIS user mode worker process (w3wp.exe), using a cut-down configuration file based on the site's applicationHost.config configuration file. Internet Explorer then starts and displays your web application.
During a profiling session you can interact with the profiler whilst your application is still being profiled, and obtain results by selecting areas of the timeline.
When you have finished interacting with your web application, click the
Stop Profiling button in ANTS Performance Profiler.

Note that you can only profile ASP.NET applications running on the computer where the profiler is installed. You cannot profile web applications that use SSL, because w3wp.exe does not support running SSL websites outside of IIS.
See also Profiling an ASP.NET application (worked example).
If you encounter problems while trying to profile an application in IIS, see Troubleshooting IIS profiling.
Profiling WCF services running on IIS
The procedure for profiling Windows Communication Foundation (WCF) services running in IIS is similar to the procedure used to profile other types of web application in IIS. It may help to think of the service as a server in a server-client relationship.
Please note the following:
- Before you start, change the WCF client contract to communicate on the unused port that you select in ANTS Performance Profiler (by default, 8013).
Changing the port is necessary because otherwise the client will communicate with the copy of the server hosted in IIS, not the copy in the worker process started by ANTS Performance Profiler.
- Set the ASP.NET web application (URL) to the path to the web application on the server.
- When you start profiling, Internet Explorer will launch.
Minimize this window and interact with your client application instead. Do not close the Internet Explorer window during profiling; this will stop ANTS Performance Profiler from collecting the performance data.
Was this article helpful?
ANTS Performance Profiler
- Installation error 5100 when installing ANTS Performance Profiler and ANTS Memory Profiler
- Attach to process unavailable with some anti-virus software
- Memory leaks observed when profiling Windows Presentation Framework (WPF) applications
- Log files
- The manifest for the SQL server event source did not match the generated events. Some SQL events may report incorrect data. To fix this issue, consider recompiling etwcls.mof
- Setting file I/O and child process profiling in high DPI modes
- HTTP request timings in IIS
- Profiling web services in IIS Express
- Method not found: 'UInt32 <Module>._ANTS_Begin_Sql(System.String)'
- Enabling line-level timings for SecurityTransparent code
- Profiling SharePoint 2010 in v6.0 - 6.3
- Profiling SharePoint subsites
- Problems synchronizing results
- Windows service profiling fails if the service uses a system account
- Profiling assemblies protected with DeployLx
- The type initializer for 'y.layout.hierarchic.ClassicLayerSequencer' threw an exception
- Forcing your application to use .NET 4
- Double hit counts occurring on one line
- System.EntryPointNotFoundException (Versions: 3,4 only)
- Methods in (ASCX) web controls may not appear
- Failed to CoCreate Profiler error profiling a Windows service
- Multiple-core portable computers may show inflated times (version 3)
- No .NET methods were profiled on web application
- ANTS Profiler code instrumentation method
- Add-in fails to load when using RunAs to start Visual Studio as another user
- Profiling unit tests using Nunit
- Can I profile Compact Framework applications?
- Profiling a SharePoint 2007 Web Part
- Profiling an assembly in the Global Assembly Cache (GAC)
- Profiling IIS web applications that need to run under the SYSTEM account
- Profiling a web application hosted in IIS on a fixed TCP port
- Profiling client-side XBAP .NET applications
- ANTS Profiler prompts for location of source code which is not your own source code
- ANTS menu remains in Visual Studio after uninstall of ANTS Profiler
- Profiling a web application needing to run as the Network Service account
- Cannot start COM+ application via Remote Desktop
- Finding the overall time taken to execute a thread
- Profiling BizTalk applications
- Profiling Microsoft Office managed-code add-ins
- The system cannot find the file specified
- Error Stopping IISAdmin profiling IIS web application on Windows XP
- Creating a global debugging symbols (PDB) directory
- Using the add-in to profile solutions containing more than one project
- Methods may be missing on multi-core systems in version 3
- ASP .NET 1.x application recycling causing incomplete results
- Application recycling causes incomplete results and other errors when profiling ASP .NET
- (version 5) Support for profiling Silverlight applications
- Couldn't open metabase error when profiling ASP .NET hosted in IIS
- Failed to coCreate Profiler on ASP .NET web application
- HTTP error 404.17 profiling ASP .NET 1.1 on IIS 7
- Performance counters missing from results
- Isolating single ASP .NET pages in ANTS Profiler results
- Missing hits for lines in the source code view
- ANTS Profiler restarts IIS
- Showing the amount of time taken for a method in one particular thread
- Please specify a valid URL message profiling ASP .NET
- Times on individual lines do not add up to method time
- Explanation of "thread blocked" methods in ANTS Profiler
- Call graph percentages do not add up exactly
- Operation could destabilize the runtime error profiling ASP .NET
- IIS ceases to work after profiling web applications
- Problems with ANTS Visual Studio integration
- ANTS Profiler has been split into two distinct programs
- Windows Installer errors 1603 and 2738 occurring during installation
- Times in source code window are greater than the times showing in the method grid or tree view
- Problems with ANTS Performance Profiler Visual Studio integration
- Profiling ClickOnce applications deployed to IIS
- Could not enable tracing due to error code 112
- AjaxControlToolkit incompatibility causing application being profiled to crash
- Could not enable tracing because SQL Express is installed
- ANTS Performance Profiler menu items not showing in Visual Studio 2010
- Profiler stopping while profiling an in-browser Silverlight application
- "No Disk" error occurring while profiling application
- IE error "Internet Explorer cannot display the webpage" when profiling a website
- Profiler failing to connect to the server when profiling web applications
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
ANTS Performance Profiler
- Activating your products
- Activating your products
- Interpreting unexpected profiling results
- Choosing a profiling mode in ANTS Performance Profiler 6
- ANTS Performance Profiler 7 release notes - version 7.xx
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using ANTS Performance Profiler
Running a profiling session