Web gardening in IIS 7, configure step by step


“Web garden” scaling out by increasing the number of worker processes per CPU. Web gardening will allow more than two subscribers to synchronize at the same time. Before going to the details of web garden, I hope you have fundamental idea on application pool and worker process. Just for reminder – for request processing in IIS, worker process (w3wp.exe) runs the ASP.NET application in IIS. Worker process is responsible for handling all kinds of request, response, session data, and cache data. Application Pool is the container of worker process. Application pool is used to separate sets of IIS worker processes and enables a better security, reliability, and availability for any web application. It will also increase CPU utilization by replisapi.dll, which can negatively impact overall server performance. So, it is important to balance these considerations when you choose a value for Maximum Worker Processes.

apppools_thumbFig – Application pool is the container of one or more worker processes

Now, by default, each and every Application pool contains a single worker process. Application which contains the multiple worker process is called “Web Garden”. Below is the typical diagram for a web garden application.

Fig – Multiple worker process in an application pool (Web garden)

Why Web garden?

  • Offering applications that are not CPU-bound but execute long running requests the ability to scale and not use up all threads available in the worker process
  • Applications that make long running database requests (e.g. high computational database transaction)
  • Applications that have threads occupied by long-running synchronous and network intensive transactions
  • You can support a greater number of concurrent synchronization operations per CPU by increasing the Maximum Worker Process property value
  • Provides better application availability by sharing request between multiple worker processes.
  • Web garden use processor affinity where application can swapped out based on preference and tag setting.
  • Less consumption of physical space for web garden configuration.

Configure Web garden in IIS 7

Step 1: Deploy and configure your web application as usual

Step 2: Modify web.config file

Find out the following line in web.config file.

If the above line exists, remove the above line and replace following line.

Here tcpip = “” is local state server IP and “42424” is the port number for state server. You can use other IP as state server.

Step 3: Modify registry by regedit

Run àregedtà HKEY_LOCAL_MACHINEàSYSTEMàCurrentControlSetàServicesàaspnet_stateàParameters

Step a: AllowRemoteConnection (Right Click)à Modify -> Set Value Data to 1 (Base Decimal) àOk

Step b: Port (Right Click)à Modify à Base Decimal àOk

Step 4: Run asp.net state service

Check the following step:

Runà controlà Administrative Toolsà Servicesà ASP.NET State Service (Right Click)à Properties

Step a: Startup Typeà Automatic

Step b: Service Statusà start

Finally Click Ok.

Step 5: Create an application pool

Create a different application pool for safety. If you use a separate application pool, it will be easy to manage. You can use default application pool also.

To create an application pool that runs using a custom service account

  1. Start Internet Information Services (IIS) Manager. (Run->inetmgr)
  2. In the left pane, expand the local computer and then select Application Pools.
  3. Right-click the Application Pools node, clicks Add Application Pool, and then clicks Application Pool.
  4. In the Add Application Pool dialog box, type “Pool Name” in the name text box. In figure Pool name is Bluechipplus. Select .NET Framework version. In figure, I select 4.0.30319. Select Managed pipeline mode. I select integrated mode. Selection of framework version and managed pipeline mode depends on your application which you are going to hosted. Click OK to complete application pool creation.


5. Now select application pools. You will see newly created Bluechipplus application pool in the middle panel.

Step 6: Configure application pool

1.   Select newly created “Bluechipplus” application pool in the middle panel.

  1. Click Advanced Settings in “Edit Application Pool” section in the right panel. A dialogue box will appear named “Advanced Settings”
  2. In Process Model section, select identity. Network service is default and recommended. If you find problem, you should change. In figure Local service is selected.
  3. In Process Model section, type maximum worker process. In figure 12 maximum worker processes selected. Selecting worker process is actually depends on your server capability and memory.
  4. In Recycling section, select private memory limit in KB. In figure 200000is selected. Consider your server memory before considering memory limit.
  5. Finally click OK to complete application pool settings.


Step 7: Select application pool for the application

  1. Right click on application in IIS->Manage Application -> Advanced Settings


2. From advanced settings dialogue box -> Browse application pool -> Select application pool


3. Finally click OK after assigning application pool

Now you have completed web garden for your application. Browse your application and cheers!!!

How to register .NET framework in IIS

If you install IIS after installing framework, you have to register framework in IIS. Otherwise you will get following message after hosting asp.net application in IIS.

ASP.NET 4.5 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.5 in order for your site to run correctly.

You may get error of different version instead of 4.5 according to your configuration. So to register framework in IIS, run the following command in command window.

  • Register framework to IIS without changing existing web applications to use this version of ASP.net

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis –ir

  • Or Installing framework to IIS

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis –i

This installed ASP.NET version v4.0.30319 without updating all script maps. After installing Rational

System Architect XT, the following command was run:

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis -s W3SVC/1/ROOT/SAXT

This installed ASP.NET version v4.0.30319 at the specified application root and its subfolders. All existing script maps in the specified path and below were updated.

For the Rational System Architect XT Web Service add-on product, the Registration tool was run with the following command:

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis -sW3SVC/1/ROOT/SAXTWebService

How to configure IIS for different port

1.      Open IIS Manager (run -> inetmgr)
2.      In the Connections pane, expand the Sites node in the tree, and then click to select the site for which you want to add/edit binding.
3.      Right click on the site and click Edit bindings
4.      Select Port on the site binding pane
5.      Click Edit button
6.      In Edit Site Binding pane type port (ex. 1080) and click Ok
IIS Port change

Configure Windows Server 2008 R2 to install SharePoint 2010

To install SharePoint 2010 on Windows Server 2008 R2 we need to configure server with the following roles and features.

Add Roles: Application Server & Web Server

To install SharePoint 2010 we need to configure server with the following roles and features.

Add Roles: Application Server & Web Server

  1. Click “Server Manager”
  2. Click “Roles”
  3. Click “Add Roles”
  4.  Mark “Application Server and Web Server”


5. Click “Add Required Features” in the above screen.

  1. Click Next
  2. Select Role Services of Application server like below screen.

28.       Select Role Services of Web Server like below screens.



9.       Click next & Install

Add Roles: File Services

  1. Click “Server Manager”
  2. Click “Roles”
  3. Click “Add Roles”
  4. Mark “File Services”
  5. Click “Next”
  6. Select “File Server” like below screen.


  1. Click Next & Install

Add Features:

  1. Click “Server Manager”
  2. Select Features at the left side of the screen
  3. Click “Add Features”
  4. Select features like below screens.



  1. Click “Next”
  2. Restart your computer

HTTP Error 404.3

Did you find the error “HTTP Error 404.3” ? Yes, I found the error at the time of deploying my ASP.NET web application to IIS 7. I found the following error (screen shot).



To solve the error follow the following steps:

Step 1: Go to Control Panel -> Programs and Features -> Turn Windows Features on or off

Step 2: Mark the features as like following image.

Step 3: Click OK and reset IIS.