dotMemory 2019.3 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 dotMemory as a standalone application. The dotMemory window will open.

  3. In the left panel, select Local.

  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 dotMemory to automatically select the port.

  6. If you want dotMemory to start collecting the stack trace allocation data* right after the profiling session starts, select the Collect memory allocation and traffic data from start option in the right panel.
    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 Control profiling via API. For more details on how to control profiling using the API, refer to the Controlling Profiling Session Through API chapter.

  8. Click Run.

  9. Take snapshots. For more details on how to control profiling session, refer to Controlling Profiling Session (if you control the session manually) or to Controlling Profiling Session Through 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.

Last modified: 16 April 2020