dotTrace 2020.2 Help

Profile Web Application in IIS Express

To profile a web application hosted in IIS Express

  1. Close all running IIS Express instances.

  2. Run dotTrace as a standalone application. The dotTrace Home window will open.

  3. In the left panel, select Profile Local App.

  4. In the middle panel in Profile Application, select IIS Express.

  5. In the right panel, in IIS Express Application:

    • If the web app you want to profile is described in the default IIS Express configuration file applicationhost.config, select Configuration file and then, in Site, select a web site you want to profile.

      Note that a config file location depends on a IDE you use:

      • JetBrains Rider: (solutionDir)\.idea\config\applicationhost.config

      • Microsoft Visual Studio 2015 and later: (solutionDir)\.vs\config\applicationhost.config

      • Microsoft Visual Studio 2013 and earlier: %USERPROFILE%Documents\IISExpress\config\applicationhost.config

      If you do not want to use a configuration file, you can select Application path and specify a full path to the directory that contains the profiled application.

    • If you want the application URL to be opened automatically, once the profiling starts, select Open URL and specify the application URL. The in browser parameter allows you to select a browser in which the URL must be opened.

    • Optionally, if you select Advanced you can specify custom IIS Express and runtime settings:

      • In Server, select an IIS Express instance,

      • in Runtime version: a .NET Framework version,

      • in Port: an HTTP port, or select Use random port if you want dotTrace to automatically select the port.

  6. In Profiler Options, specify profiling type. Typically, you should choose between Sampling (evaluate performance and determine slowest methods in your app) and Timeline (determine slowest methods and how method calls are distributed in time).
    For more details on profiler options, refer to the Profiler Options section.

  7. Optionally, if you are going to control profiling session (take snapshots, end session, and so on) using the API (rather than the Controller window), select Advanced and Use profiler API. For more details on how to control profiling using the API, refer to the Control Profiling Session with API chapter.

  8. Click Run.

  9. Collect profiling data (snapshots). For more details on how to control profiling session, refer to Control Profiling Session (if you control the session manually) or to Control Profiling Session with API (if you control profiling using the API).

  10. After you collect the data, either close the profiled application or detach the profiler using the Detach button of the Controller window. If you use the API to control profiling, detaching must be executed by your code.

  11. Analyze the collected snapshots either in the Performance Viewer or Timeline Viewer (depends on the profiling type you select).

Last modified: 06 August 2020