Profiling the Visual Studio Web Server

With JetBrains’ dotTrace and Red Gate Software’s ANTS Profiler, developers can find bottlenecks in their code as well as profile memory usage. Both tools also support tracing the Visual Studio (2005) Web Server out-of-the-box. However, tracing with Visual Studio 2008 Web Server is a little different.


Instead of trying to profile a Web Application started from VS’s web server, profile a new application. Then, when dotTrace or the ANTS profiler ask you what application you want to profile, fill in the following settings.

dotTrace:

Dot Trace

ANTS:

ANTS Profiler

The application is the location of the Visual Studio Web Server. For me, that is C:\Program Files\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.EXE

The arguments include the path, port, and vpath switches. The path is the physical path to the Web application. The port number is, obviously, the port on which the web server is run. The vpath is the virtual path or application root in the form in the form of “/…”

So dotTrace and ANTS will start the application, and then you can use a client or tests to interact with the service that either of the profilers started. When you’re done with your profiling session, you can get a snapshot and continue with your day. :)

One Response to “Profiling the Visual Studio Web Server”

  1. Jetbrains dotTrace: Profiling VS2008 Web Apps « Alex Duggleby’s Palace of Words Says:

    [...] is a way to profile against the VS08 web server as described here, but you can also just copy the WebDev.WebServer.exe from the one directory to the [...]

Leave a Reply