Profile Web Application in IIS Express
To profile a web application hosted in IIS Express
Close all running IIS Express instances.
Run dotTrace as a standalone application. The dotTrace Home window will open.
In the left panel, select Profile Local App.
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:
Microsoft Visual Studio 2015 and later:
Microsoft Visual Studio 2013 and earlier:
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.
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.
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 Controlling Profiling Session Through API chapter.
Collect profiling data (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).
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.