ANTS Performance Profiler 7

Profiling ASP.NET applications running on IIS

To profile ASP.NET applications running on IIS, on the ANTS Performance Profiler Settings dialog box, perform the following steps:

  1. Under Choose application type to profile, click ASP.NET web application (IIS).
  2. 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).
  3. Select the required Profiling modefile I/O, and Profile child processes options; see Working with Application Settings.
    In ANTS Performance Profiler 7.3 and later, SQL queries and incoming HTTP calls will be profiled automatically.
  4. 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.

  5. If required, select Manually specify ASP.NET account details and enter the User namePassword 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 7\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 7\ProfilerCore.dll
  6. If required, change the performance counters to record; see Setting up Charting Options.
  7. 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 while 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).

Troubleshooting

If you encounter problems while trying to profile an application in IIS, see Troubleshooting IIS profiling.

Troubleshooting in ANTS Performance Profiler 7.0

In ANTS Performance Profiler 7.0, the continuous profiling tool runs as a separate tool from the main ANTS Performance Profiler product. If you installed an early access build of the ANTS Performance Profiler continuous profiler IIS module, other profilers - including the desktop ANTS Performance Profiler product - will be unable to profile applications running in IIS on this computer. To re-enable other profilers with IIS, uninstall the IIS Profiler Module:

  1. From your computer's Start menu, launch the Continuous Profiling Configuration Tool
  2. Click Uninstall.

For more information on configuring continuous profiling, see Setting up continuous 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.


Didn't find what you were looking for?