Tag: iis

How Application Pools Work IIS 6.0

When you run IIS 6.0 in worker process isolation mode, you can separate different Web applications and Web sites into groups known as application pools. An application pool is a group of one or more URLs that are served by a worker process or set of worker processes. Any Web directory or virtual directory can be assigned to an application pool.

Every application within an application pool shares the same worker process. Because each worker process operates as a separate instance of the worker process executable, W3wp.exe, the worker process that services one application pool is separated from the worker process that services another. Each separate worker process provides a process boundary so that when an application is assigned to one application pool, problems in other application pools do not affect the application. This ensures that if a worker process fails, it does not affect the applications running in other application pools.

Use multiple application pools when you want to help ensure that applications and Web sites are confidential and secure. For example, an enterprise organization might place its human resources Web site and its finance Web site on the same server, but in different application pools. Likewise, an ISP that hosts Web sites and applications for competing companies might run each companys Web services on the same server, but in different application pools. Using different application pools to isolate applications helps prevent one customer from accessing, changing, or using confidential information from another customers site.

In HTTP.sys, an application pool is represented by a request queue, from which the user-mode worker processes that service an application pool collect the requests. Each pool can manage requests for one or more unique Web applications, which you assign to the application pool based on their URLs. Application pools, then, are essentially worker process configurations that service groups of namespaces.

Multiple application pools can operate at the same time. An application, as defined by its URL, can only be served by one application pool at any time. While one application pool is servicing a request, you cannot route the request to another application pool. However, you can assign applications to another application pool while the server is running.

From Microsoft Technet

Configuring IIS Application Pool

IIS Application Pool contains all web applications on domains hosted on your server. Dedicated IIS application pool allows your clients to have a level of isolation between web applications used by their domains. Since each dedicated application pool runs independently, errors in one application pool belonging to one client will not affect the applications running in other application pools belonging to other clients.

By default, Plesk offers a shared application pool for all your clients and their customers. However, clients and domains can use dedicated application pools if administrator and client policy permit this.

IIS application pool can work in three modes:

  • Shared pool is always used for all clients and domains.
  • Dedicated pool is always used for every client and domain.
  • Shared pool is used for clients and domains by default; clients are allowed to assign dedicated pools for their customers.

To change the IIS application pool working mode:

  1. Go to Server > IIS Application Pool.
  2. Select Global Settings tab.
  3. Select the required mode and click OK.

To limit the amount of CPU resources that the IIS application pool can use:

  1. Go to Server > IIS Application Pool.
  2. Select the Switch on CPU monitoring check box and provide a number (in percents) in the Maximum CPU use (%) field.
  3. Click OK.

To stop all applications running in the server application pool:

  1. Go to Server > IIS Application Pool.
  2. Click Stop.

To start all applications in the application pool:

  1. Go to Server > IIS Application Pool.
  2. Click Start.

To restart all applications running in the application pool:

  1. Go to Server > IIS Application Pool.
  2. Click Recycle. This can be handy if some applications are known to have memory leaks or become unstable after working for a long time.

via Configuring IIS Application Pool.

How to fix: “PageHandlerFactory-Integrated” has a bad module

How to fix: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

I am configuring an MVC 3 project to work on a local install of IIS and came across the following 500 error:
Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list.
It turns out that this is because ASP.Net was not completely installed with IIS even though I checked that box in the “Add Feature” dialog.

To fix this, I simply ran the following command at the command prompt

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

If I had been on a 32 bit system, it would have looked like the following:

%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i

Read more at Stack Overflow

Defining ASP.NET 4.0 as Application Pool on IIS 7

I was trying to move my local website to to Windows 7. The application must run ASP.NET v4.0 as the application pool within IIS. This is how I was able to get it working.

  • Open your command prompt (Windows + R) and type cmd and press ENTER.  You may need to start this as an administrator if you have UAC enabled. To do so, locate the exe (usually you can start typing with Start Menu open), right click and select “Run as Administrator”
  • Type cd C:WindowsMicrosoft.NETFrameworkv4.0.30319 and press ENTER.
  • Type aspnet_regiis.exe -ir and press ENTER again.
    • If this is a fresh version of IIS (no other sites running on it) or you’re not worried about the hosted sites breaking with a framework change you can use -i instead of -ir. This will change their AppPools for you and steps 5-on shouldn’t be necessary.
    • at this point you will see it begin working on installing .NET’s framework in to IIS for you
  • Close the DOS prompt, re-open your start menu and right click Computer and select Manage
  • Expand the left-hand side (Services and Applications) and select Internet Information Services
    • You’ll now have a new applet within the content window exclusively for IIS.
  • Expand out your computer and locate the Application Pools node, and select it. (You should now see ASP.NET v4.0 listed)
  • Expand out your Sites node and locate the site you want to modify (select it)
  • To the right you’ll notice Basic Settings… just below the Edit Site text. Click this, and a new window should appear
  • Select the .NET 4 AppPool using the Select... button and click ok.
  • Restart the site, and you should be good-to-go.

(You can repeat steps 7-on for every site you want to apply .NET 4 on as well).