Profile Web Application in IIS Express
To profile a web application hosted in IIS Express
Close all running IIS Express instances.
Run dotMemory as a standalone application. The dotMemory window will open.
In the left panel, select Local.
In the middle panel in Profile Application, select IIS Express.
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.
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.
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 Control Profiling Session with API chapter.
Take 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).
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.