Adds the application pool to the metabase.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Public Shared Sub ProvisionIisApplicationPool ( _
name As String, _
identityType As Integer, _
userName As String, _
password As SecureString, _
idleTimeout As TimeSpan, _
periodicRestartTime As TimeSpan _
)
Dim name As String
Dim identityType As Integer
Dim userName As String
Dim password As SecureString
Dim idleTimeout As TimeSpan
Dim periodicRestartTime As TimeSpan
SPMetabaseManager.ProvisionIisApplicationPool(name, identityType, userName, password, idleTimeout, periodicRestartTime)
public static void ProvisionIisApplicationPool (
string name,
int identityType,
string userName,
SecureString password,
TimeSpan idleTimeout,
TimeSpan periodicRestartTime
)
Parameters
- name
A String that represents the name of the application pool.
- identityType
An object of type IdentityType that specifies the format of the identity.
- userName
A String that represents the account with which to configure the application pool identity.
- password
A SecureString that represents the password for the user account.
- idleTimeout
A TimeSpan object that represents the amount of time (in minutes) a worker process should run idle if no new requests are received and the worker process is not processing requests.
- periodicRestartTime
An TimeSpan object that represents the amount of time, in minutes, after which IIS rotates an isolated out-of-process application.
The application pool identity is configured with a specific Windows user account that is either a local account on the Web server or a domain account within the AD DS domain. When a new instance of w3wp.exe for a specific application pool is launched, it uses the application pool identity to initialize the process token. This establishes the “runs as” identity for code that runs within the IIS worker process.
IIS uses the identity of the local Network Service account when a new application pool is created. When deploying Web sites based on ASP.NET and Windows SharePoint Services, it is recommended that the application pool identity be configured with a domain account instead of the Network Service account, especially for Web farm environments that need to synchronize the identity of an application pool across multiple front-end Web servers.