Is this really the version you are looking for? Kentico 8 documentation is no longer updated. Use the switch in the header to choose your Kentico version.

Creating virtual directories and application pools in IIS 7.5 and 7.0

If you need to install Kentico manually on a remote server or restore it from a backup and, at the same time, you run Kentico in a sub-folder (in contrast to running Kentico in the root of the website), you need to create a new virtual directory for the folder where you have the web project files.

Application root

The root of the website or the virtual directory must be the same as the folder that contains the web.config file of Kentico. This folder is called application root.

Creating a virtual directory in IIS 7.5 and 7.0

Since IIS 7, there exists a separate concept for a virtual directory and an application.

  • You can map a virtual directory to a physical directory that is located on a local or a remote computer. The physical directory (under the specified name of the virtual directory) then becomes part of the application's URL.
  • An application, on the other hand, is a group of files that provides services over protocols. So if you want to run your website as http://localhost/KenticoCMSDemo, you have to use an application instead of a virtual directory and specify KenticoCMSDemo as the application's alias.

You can find more information about virtual directories in Understanding Sites, Applications, and Virtual Directories on IIS 7.

On this page

To create a virtual directory:

1. Open IIS Manager

  • On Windows 7: Open Start -> Control Panel -> System and Security category -> Administrative Tools -> Internet Information Services (IIS) Manager.
  • On Windows Server 2008 or Windows Vista: Open Start -> Control Panel -> System and Maintenance category -> Administrative Tools -> Internet Information Services (IIS) Manager.

2. Expand local computer -> Sites -> right-click on Default Web Site (or other website if you're running multiple websites on the same computer) and choose Add Virtual Directory... 

  • An Add Virtual Directory dialog appears.

3. Enter the Virtual Directory Alias. If you want the website to run as http://localhost/KenticoCMSDemo, enter alias KenticoCMSDemo.

4. Type a path or browse to the physical directory that contains the chosen directory.


5. Click OK.

  • The system creates a new virtual directory.

6. Right-click the virtual directory and choose Convert to Application.

  • An Add Application dialog appears.

7.Click Select... and choose the ASP.NET v4.0 application pool from the drop-down menu.

8. Click OK.

The system converts the virtual directory to an application.

Alternatively, you can create an application in one step by right-clicking a web site and choosing Add Application... and filling the required information in the Add Application dialog as mentioned above.

Configuring application pools in IIS 7 and IIS 7.5

Application Pools provide you with additional level of website management. They are supported only by Windows Server 2003/2008/Vista/7. You can configure them in the Internet Information Services (IIS) Manager under local computer -> Application Pools.

 

You can check and change the assigned application pool by right-clicking an application under local computer -> Sites -> Default Web Site (or other web site) and selecting Manage Application -> Advanced Settings...

 

You can set the Recycling and other options by right-clicking on an application pool under local computer -> Application Pools and selecting Advanced Settings....

 

Recommended Application Pool Configuration

  • It's highly recommended that you run Kentico in a separate application pool. If you share the pool with other websites, the system may behave unpredictably.
  • We do not recommend to run multiple websites in a single pool.
  • It's recommended that you specify some value in the Recycle worker processes on the Recycling tab. This value shouldn't be too short (less than 60 minutes) or too long (more than 1440 minutes/1 day). Setting this value ensures that the memory is recycled and the application is automatically recovered from failures by regular restart. If your website freezes time to time, you can temporarily set the value to 30 minutes to ensure that the website is restarted automatically. Short intervals may lead to high server load and slow response since after each recycling, the application needs to be restarted and data reloaded to the cache.
  • It's recommended that you do not limit the maximum virtual or used memory. If you need to use some value, use at least 100 MB. If your website is being restarted too often, it may be caused by low maximum memory limit. You can check the frequency of application restarts in Kentico Event log.
  • The Maximum number of worker processes on the Performance tab must be set to 1. If you set a higher value, the worker processes will not be synchronized and Kentico website will not work correctly. This may lead to unexpected caching of content and system objects.
  • You can configure the user account under which the application runs on the Identity tab. This information is useful if you need to troubleshoot issues with permissions, such as disk write permissions.
  • Kentico does not support Web garden. Therefore, the Maximum number of worker processes has to be set to 1.