Microsoft IIS 10.0 – Configuring virtual directories with different application pools

Installing an FTP server

In this recipe, we are going to add a framework version 4 application pool called DefaultAppPool and framework version 2.0 application pool called 2and3.5Apppool to the virtual directory step by step.

Getting ready

To step through this recipe, you will need a running IIS 10.0 instance with a virtual directory created. You should also have administrative privileges.

How to do it…

  1. Open Server Manager on Windows Server 2016. Click on the Tools menu and open IIS Manager.
  2. Expand the IIS server ( WIN2016IIS). You will get a list of Application Pools and Sites.
  3. Expand Sites and select mysite.com, and right-click on mysite.com. You will see Add Application:
  1. Click on Add Application…, and you will get the Add virtual directory with Application Pool option. Enter the alias name VDApplication; we selected DefaultAppPool, which has framework version 4.0.
  1. We’ve already created a folder in C:\Websites\VDApplication\. Add the physical path. We’ve added C:\WebSites\VDApplication\.
  2. Click on OK. You have now created the virtual directory with an application pool:
  1. In the Connections panel, you can see under mysite.com that there are two virtual directories: virtualdirectory, which does not include the application pool (you can run only normal files such as HTML), and VDApplication, which includes the DefaultAppPool application pool (you can run your web application here).
  2. Let’s configure the virtualdirectory with framework version 2.0, which has already been created as 2and3.5AppPool.

 

 

  1. Right-click on virtualdirectory and click on Convert Application. Once you have converted it, the virtual directory icon will be changed, and you can see highlighted it in the previous figure:
  1. Next, you will get an Add Application window, as shown in the previous figure. Only the Change Application Pool option is available; you can select the 2and3.5AppPool application pool. Click on the OK button.
  2. Now you have two virtual directories created with different application pools: VDApplication with DefaultAppPool and Virtual Directory with 2and3.5AppPool.

How it works…

In this recipe, we created an application directory and virtual application directory and added an application pool to the virtual directory in steps 1 to 6. In steps 7 to 11, we added custom application pools from an existing virtual directory.

Comments are closed.