The AppPoolId property specifies the application pool where the application is routed.
If an AppPoolId is not specified for a particular application; the application inherits the AppPoolId from a parent key that has the AppPoolId property set. If none of the application’s parents have this property set, the application pool inherits this setting from the site level, or from the World Wide Web Publishing Service (WWW service) level. If no valid AppPoolId is available through inheritance, the application pool fails and an error is written in the event log.
You can configure this property at the following locations in the IIS metabase.
IIS Admin Object Type