Tip #60: Did you know… How to Profile an ASP.Net site?

1. Create a asp.net web application in Visual Studio Team Edition For Developers

2. Write some code inside Page_Load function

protected void Page_Load(objectsender, EventArgs e)
{
    int sum = 0;
    for(int i = 0; i < 2000000; i++)
    {
        sum += i;
    }
    Response.Write(sum);
}

3. Launch performance wizard

image

4. Select the application (default) and select next

image

5. Choose Sampling, and select next

image

6. Click Finish

7. Launch with Profiling

image

8. Perform actions on IE and close it when it’s done

9. Performance report Summary is going to be displayed

image

 

For complete detail reading, please refer to https://msdn.microsoft.com/en-us/library/bb385749.aspx (

Getting Started with Profiling Tools)

 

Xinyang Qiu

SDETII | Visual Web Developer