Looking for a contract position
in Toronto area as a Senior .NET Developer
Toronto, ON, M6P 2P2
Tel: 647.328.3809
Email: 

How to profile asp.net web application with DotTrace

If your application works slow and you can’t understand why, than have a look at dotTrac. It’s a very good tool from JetBrains. It helps you to profile both windows and web application written in c#.

Profile web application is very easy. After starting dotTrace you have to select “Profile Application”.

image

New window appears and you have to provide path to Web dev server. At my PC it’s here:

 C:\Program Files\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.EXE

Arguments must be path to your web application, port number and virtual path. It must be something like this:

/path:"D:\SVN\AlexanderShapovalov\Web" /port:1234 /vpath:"/AlexanderShapovalov"

be careful about slashes at the end of the path. It must be no slash.

image

After that, window “Control profiling” appears. And you have to run your application and press button “Start profiling”. Than after finishing profiling press “Get Snaphost” button.

image

New window appears with information about application. And in the bottom of this window you can see your source code for called methods. If you need to edit some method in source file, press “Open in Visual Studio” button in source code window and you will navigate to Visual studio.

image

If it will be an error while starting profiler, you have to copy files WebDev.WebServer.EXE and WebDev.WebServer.EXE.manifest into your .NET framework folder. Usually it’s

 C:\Windows\Microsoft.NET\Framework\v2.0.50727\

 
Powered by AtomicCms content management system