I am running on a performance issue with ASP.Net 2.0 Application.

A page takes atmost 20+ secs to load in a browser.

I would like to know where the problem is occurring, i.e in browser(rendering) or in server(processing).

Is there a way to log the time taken for each request in IIS 7.5?

Any suggestion or help?

  • I guess "Time Taken" field is what you need. And it's already there at Site | Logging -> "Select Fields" button. – LazyOne Apr 22 '13 at 8:57
  • Maybe you should start with fiddler on the client: it'll let you find out exactly what resource takes long to load on a page and allow you to eliminate obvious errors (like CSS pointing at incorrect server and such). – Stephane Apr 22 '13 at 9:03

Enable "Time Taken" in W3C logs

To give a useless but precise and correct answer, here is how you go about logging the timespan each request takes to process:

In the IIS Manager:

  1. In the left pane, expand "Sites"
  2. Select the appropriate web site
  3. In the middle pane, double-click the "Logging" feature
  4. Click "Select Fields"
  5. Make sure that the field "Time Taken ( time-taken )" is checked.

A nice HowTo with screenshots are available at IIS.NET

Enable "Failed Request Tracing" in IIS

That however, will only tell you how many milliseconds the execution of a request took, not why.

To dig deeper into why it's slow, you might benefit from the "Failed Request Tracing" feature:

  1. Make sure you have enabled the Web Server role service called "Tracing". It can be found in Server Manager by selecting the Web Server Role, "Add Role Services" and then checking "Web Server -> Health and Diagnostics -> Tracing"
  2. In IIS Manager, select your Server (top level) in the left pane
  3. Double-click "Failed Request Tracing"
  4. In the "Actions"-pane, click "Add..."
  5. Choose "Custom", and specify an expression that matches the file you want to trace
  6. Although it might seem tempting to choose the "Time taken" condition, it will cause Tracing to stop and generate a trace reports as soon as the limit has been exceeded, so use a Status Code condition instead.
  7. Leave the "Providers" all checked, and press Finish.

Now you have a proper tracing rule in place, all you need to do is to enable site tracing on the Web Site you are having problems with:

  1. In the left pane, expand "Sites"
  2. Select the appropriate web site
  3. In the middle pane, double-click the "Failed Request Tracing" feature
  4. You will see the rule you just configured in the list, as "Inherited"
  5. In the right-hand pane, click "Edit Site Tracing", check "Enable" and press OK.

All the failed request reports will appear in the folder specified in step 5 (default location: %SystemDrive%\inetpub\logs\FailedReqLogFiles)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.