Application pools are a great way to isolate applications from one another even when they share the same server. This ensures a bug in one app won’t directly affect any other apps associated with it. But many a times server admins feel the need to change application pool for an application. Perhaps it has to do with the bug itself. By moving it to another application pool, you protect other apps from the faulty ones. In this article, we’ll guide you through the process of changing the application pool for an app in IIS 7.

Changing an Application Pool for an Application

You can changing the pool in a variety of ways, such as:
  • Working with the UI or User Interface
  • Writing scripts for WMI (Windows Management Instrumentation)
  • Using the CLI and editing Appcmd.exe file
Working with UI

The easiest way to get the job done is working with the UI. So let’s adopt the method for changing the application pool. Here are the steps involved:
  • Open the IIS 7 Manager
You can click on the icon to launch the manager.
  • Click on “Application Pool”
You can find this under Advanced Settings >> Configuration. Then navigate to Connections followed by server node. You’ll see a list of options including Application Pool. Click on it.
iis2.png

  • Select the Application Pool Type
You need to select the application pool type from the menu. To view the menu, click on browse.
iis3.png
  • Select “View Application”
Look for the “Action” panel and click on “View Applications”.

  • Make the Necessary Changes
Apply the changes you want to make and click on the “Change Application Pool” option.
  • Select Application Pool
Finally, select the application pool from the dialog box and hit “OK” to confirm.

Your application pool is successfully changed in IIS 7.

Working with CLI

If you want to work on the CLI to make the changes, the follow the steps:
  • Open your terminal
  • Start with this syntax in your CLI
Code:
**appcmd setapp /app.name:**string **/applicationPool:**string**
In this syntax, “app.namestring” is the application you wish to change. “applicationPoolstring” is the application pool where the application is intended to be included in. Both are variables.

For example, if you run a website called dogfood and want to add an application called discount to an application pool titled Advertising, the syntax will look exactly like this:

Code:
appcmd setapp /app.name:dogfood/discount /applicationPool:Advertising
Now the necessary changes have been made.

Writing Scripts in WMI

For website and app administrators, the IIS 7 provides the Windows Management Instrumentation. The WMI scripts contains the methods and classes required to script web administration or web apps administration. Besides this, you can also work on the properties and objects that are associated with admin.

With WMI scripts, you can read, access, and modify files for configurations like the “ApplicationHost.config” or “Web.confg”. The possibilities are endless and this makes WMI scripting really powerful for changing an application pool.

To change this, you need someone who understands scripting. If not, we’d recommend you to use CLI or the UI to change the application pool.
Author
bhawanisingh
Views
148
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from bhawanisingh

Top