IIS Settings to Improve ASP.NET Web Application Performance

This article helps you to understand required IIS settings to improve ASP.NET Website Performance.


IIS Logging:

IIS by default logs lot of data like client IP address, User Name, Method, URI stem, Protocol status, User agent, and a lot of other attributes. All of those attributes are not required by your application. You can easily customize what data to log and what to avoid. This results in reduced bandwidth.

Follow below steps to customize IIS logging

1. Open IIS Manager (inetmgr).

2. Click on <server name> -> Sites -> <your site>

3. Double click on the Logging module from the middle pane of the window.

4. From new window click on Select Fields

5. You will see a new window where you can select or de select logging attributes. Click Ok and from parent window, right pane click Apply.

customize IIS Logging

Disable IIS logging

  1. Open IIS Manager (inetmgr).
  2. Click on <server name> -> Sites -> <your site>
  3. Double click on the Logging module from middle pane of window.
  4. You will see the IIS logging feature window. From right pane of IIS logging window click on Disable

HTTP Compression

Enable Static content compression in IIS, it helps to compress static content requests. Enabling static compression gives you a more efficient use of bandwidth.

You can also enable compression for dynamic content however it includes runtime cost to process dynamic content, it may degrade CPU resources performance. So it is not really helpful.

Enable HTTP Compression in IIS

  1. Open IIS manager (inetmgr).
  2. Click on <server name> -> Sites -> <your site>
  3. Double click on the Compression feature.
  4. You will see checkboxes to enable Dynamic content and Static Content. Make sure the checkbox for Static content is checked.

Dynamic content compression module is not installed by default in system. You have to install it using Server Manager -> Role services.

You may check for more detail way of enable httpCompression for asp.net web sites

Output cache

Caching is important feature of application, it helps for improving speed of IIS response time by taking copy of a webpage visited by most recent user. If another user make request to same page stored in cache, IIS respond with copy from its cache without reprocessing the contents. Output caching significantly improve server response time for contents.

Enable Output Caching in IIS

  1. Open IIS Manager (inetmgr).
  2. Click on <server name> -> Sites -> <your site>
  3. Double click on Compression feature.

HTTP expires header

It the directs client's browser to cache webpages and its elements like css, scripts, images, etc. It helps to minimize the number of HTTP requests send to IIS by website visitors.

To set value for this. Follow below steps

  1. Open IIS Manager (inetmgr).
  2. Select the website for which you want to make settings for headers.
  3. Double click on Http Response Headers.
  4. From Action pane (right pane) click on Set Common Headers.
  5. Check Expire Web Content and desired value. One year is recommended.

Classic ASP module

To configure classic ASP websites IIS has an ASP module. If you do not have classic ASP code you can disable this module from IIS.

If you have classic ASP code make sure you have configured below settings.

1. Disable IIS debugging: Open ASP feature from IIS Select Compilation -> Debugging Properties

Set Enable Client Side Debugging and Enable Server Side debugging as false.

IIS ASP Module

ASP Threads Per Processor Unit

It specifies the maximum number of worker threads can be created. The default value is 25 and the maximum can be 100. The ideal value for this is the number of threads that can consume less than 50% of processor time. You can set it to 50 and test performance. See more tips on ASP.NET Website Performance Improvement

For setting this value open ASP module from IIS -> click on Limits Properties and set value for Threads Per Processor Unit.

ASP Queue Length property

This property decides how often server the should send error 503 (Server is too busy). When you set value too low server will send error 503 frequently and if you set it too high server will wait till the existing requests processed and responsiveness to user will be low. Watch queue on high traffic and set value accordingly.

If you do not have details for setting value of ASP Queue Length property, set it to the value of Threads Per Processer * Number of Processor. For example, if the ASP Threads Per Processor Limit property is 25 and you have four processors (4 * 25 = 100 threads), you can set it to 100.

For setting this value open ASP module from IIS -> click on Limits Properties and set value for Queue Length.

Speak your mind
Please login to post your comment!


  • geeksarray user
    04/11/2020 09:44 AM reinanbruno

    Hello, could you help me with a question that is as follows I want to Compress physical files using GZipStream (I'm already generating the files) but on the server for some reason it does a replace on the file in the folder (C: \ inetpub \ temp \ IIS Temporary Compressed Files \ pool) for example I generated in C # the has a file called main.js that I copy to the folder (C: \ inetpub \ temp \ IIS Temporary Compressed Files \ pool) only that the statistical understanding does not take there the files it simply replaces the main.js with the file that the IIS generates automatic, how can I solve this?