Share via


IIsWebDirectory.AppCreate2 (ADSI)

You can use the AppCreate2 method of the IIsWebDirectory (ADSI) or IIsWebVirtualDir (ADSI) object to create a Web application definition and mark it as running in-process, out-of-process, or in a process pool. If an application already exists at the specified path, you can use this method to reconfigure the application to run in whatever process space you want.

Syntax

DirObj.AppCreate2InProcFlag

Parameters
  • DirObj
    An IIS ADSI object of type IIsWebDirectory or IIsWebVirtualDir.
  • InProcFlag
    Binary value that specifies whether the application being created is to run in-process (0), out-of-process (1), or in a pooled process (2). If the application already exists and is running, changing the value of this flag will cause the application definition to be deleted and a new application created to run in the specified process space.
Code Example
  <% 
  Dim DirObj 
  Const INPROC = 0 
  Const OUTPROC = 1 
  Const POOLED = 2 
  Set DirObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/MyAppDir") 
  'Create the application in-process. 
  DirObj.AppCreate2 POOLED 
%>