Hosting Concepts

The Windows Process Activation Service (WAS) provides an application environment to host applications containing WCF and WF services. Using IIS and WAS for hosting your applications provides benefits that include process life-cycle management, process recycling, shared hosting, rapid failure protection, process orphaning, on-demand activation, and health monitoring. For detailed information about WAS hosting, see Hosting in Windows Process Activation Service (https://go.microsoft.com/fwlink/?LinkId=160255). For other hosting options for services, see Hosting Services (https://go.microsoft.com/fwlink/?LinkId=184303).

AppFabric extends the application environment by adding features such as auto-start and by providing a rich management experience through IIS Manager extensions and Windows PowerShell cmdlets. AppFabric itself does not provide a hosting infrastructure. When you use AppFabric for your applications, you are still using the IIS and WAS hosting infrastructure, but you can take advantage of the rich set of configuration, monitoring, and management tools that AppFabric provides.

You can use the AppFabric auto-start feature to automatically start some or all services within an application when the application starts. By using this feature, you can reduce the latency involved in processing the first message a service receives because the service is already started and initialized. With auto-start, you do not need to develop custom listener adapters to support receiving messages over protocols that are not supported by IIS and WAS. See Auto-Start Feature for more details.

AppFabric includes the Service Management Service, which allows clients to remotely start a service in an application. This service is primarily used by the Workflow Management Service (WMS). The Workflow Management Service uses the Service Management Service to activate activatable workflow service instances in a persistence store. See Service Management Service for more details.

You can use the IIS Manager extensions and Windows PowerShell cmdlets that AppFabric provides to deploy, configure, monitor, and manage applications containing WCF and WF services. For example, you can configure some or all services in an application to automatically start when the application starts by using configuration dialog boxes in IIS Manager or cmdlets. See Managing an Application for more details.

AppFabric hosting and persistence features support high availability, scalability, and reliability of applications that contain WCF and WF services without requiring changes in the development process. See Persistence Concepts for more details on persistence features.

Application Pool Recycling

If you want to prevent an application pool from recycling, you will need to set the values of properties of the application pool as shown in the following table. In IIS Manager, in the Connections pane, expand the computer name, and then click Application Pools to view available application pools in the Details pane. Right-click the application pool you want to configure, and then click Advanced Settings to launch the Advanced Settings dialog box, which allows you to configure the following properties.

Application Pool Setting Value

Process Model\Idle Timeout

0

Recycling\Regular Time Interval

0

Recycling\Disable Recycling for Configuration Changes

True

Rapid Fail Protection\Enabled

False

Recycling\Virtual Memory Limit

0 (default)

Recycling\Private Memory Limit

0 (default)

Recycling\Request Limit

0 (default)

Recycling\Specific Times

Empty (default)

CPU\Limit

0 (default)

You should also set the value of the idleTimeout attribute of the hostingEnvironment element in the <system.web> section of a configuration file to infinite if the attribute is set to some other value. The default value of the idleTimeout attribute is infinite, so you may not have to set this value explicitly in most scenarios.

In This Section

See Also

Other Resources

Hosting Samples