Quantcast
Channel: .Net Scraps - IIS 7
Viewing all articles
Browse latest Browse all 30

Did you know: Enable HTTP Keep-alive in IIS 7 / 7.5

$
0
0

Before you try to figure out where exactly Enable HTTP Keep-alive is in IIS 7, you should know what exactly it is and why this is beneficial for you.

<snip>

The HTTP keep-alive response header improves Web server performance by keeping a client/server connection open across multiple requests to the server. The open connection improves performance when a client makes multiple requests for Web page content, because the server can return the content for each request more quickly. Otherwise, the server has to open a new connection for every request. By default, the HTTP keep-alive response header is enabled in IIS 7.

Read this 

</snip> 

In IIS 6.0

  1. Right click on Web Site (Default Web Site in our case) and click on Properties
  2. In the Web Sites Properties dialog box, under Connections

    image5
  3. Enable HTTP Keep-Alives” is checked by default.

In IIS 7 / 7.5

  1. Click on the Web Site (Default Web Site in our case)
  2. In the Features View, double click HTTP Response Headers
  3. Click on Set Common Headers… in Actions panel
  4. or Right click in the HTTP Response Headers Feature Page and click Set Common Headers…

    image6

  5. You will see “Enable HTTP keep-alive” already checked.


Command line option to enable/disable HTTP keep-alive header:

To enable HTTP keep-alive header:
appcmd set config /section:httpProtocol /allowKeepAlive:true

To disable HTTP keep-alive header:
appcmd set config /section:httpProtocol /allowKeepAlive:false

NOTE: In IIS_schema.xml, under system.webServer/httpProtocol which has allowKeepAlive default set to true.


Hope this helps,
Vivek Kumbhar


Quote of the day:
I'm a godmother, that's a great thing to be, a godmother. She calls me god for short, that's cute, I taught her that. - Ellen DeGeneres



Viewing all articles
Browse latest Browse all 30

Trending Articles