Profiling ASP.NET applications running on the web development server
Published 14 May 2018
The ASP.NET web development server (also known as 'WebDev' or 'Cassini') is the built-in web server for your development environment. It is a good place to start debugging web applications because, unlike in IIS, you do not have to worry about configuration and security settings. You also do not have to worry about stopping and restarting the web server. The web development server does have limitations, however, so eventually you will want to test your web application under IIS. This is especially true if your web application has pages accessible only by users with the appropriate security settings.
You can profile a debug build of your ASP.NET web application while it runs in the web development server by following the instructions below.
Setting up the Performance Profiler
To profile ASP.NET applications running on web development server:
- From the list of application types, click Web development server - ASP.NET.
- Set the ASP.NET web application path for the web application that you want to profile.
The path is where the file with the file extension .aspx is located.
Note: You may find that the .aspx file is saved in the /WebSites/ directory, not in the /Projects/ directory where you would normally expect to find it.
For MVC3 applications that do not have a .aspx file, enter the path to the folder containing the highest-level Web.config file for the application.
- Click Show server options
The options for ports, virtual directories, and your start page and .NET version are displayed:
- In server options, in the Port box, set the port on which ANTS Performance Profiler should listen.
For example, if you specify staging for the virtual directory and 8013 for the port number, your web application starts on URL http://localhost:8013/staging/.
- In server options, in the Virtual directory box, specify the application's virtual path on the web server. Specify a start page in the Start page box.
- In server options, set the .NET version used by your web application.
- Select the required Profiling mode, Chart performance counters, Additional profiler options, and the browser to launch the application.
For more information, see Working with application settings and Setting up chart performance counters.
Note that SQL queries and inbound HTTP requests are profiled automatically.
The web development server starts and the web application is shown in your default browser. During a profiling session you can interact normally with your application and with the profiler.
When you have finished interacting with your web application, click thebutton in ANTS Performance Profiler to stop profiling.
This closes both the web development server and the ASP.NET application. ANTS Performance Profiler shows all of the profiling data collected for the application.
Closing your browser window will not cause profiling to stop.