AppCreate

You can use the AppCreate method of the IIsWebDirectory or IIsWebVirtualDir object to create a Web application definition and mark it as running in-process or out-of-process. If an application already exists at the specified path, you can use this method to reconfigure the application from in-process to out-of-process, or the reverse.

Syntax

DirObj.AppCreate InProcFlag

 

Parameters
DirObj
An IIS Admin Object of type IIsWebDirectory or IIsWebVirtualDir.
InProcFlag
Specifies whether the application being created is to run in-process (TRUE) or out-of-process (FALSE). If the application already exists and is running in-process, specifying this flag as FALSE will cause the application definition to be deleted and a new application created to run out-of-process. If the application already exists and is running out-of-process, specifying this flag as TRUE will cause the application definition to be deleted and a new application created to run in-process. If the application exists, and the setting of InProcFlag matches the application's existing in-process or out-of-process status, then this method will cause no change to the application definition.
Code Example
<% 
  Dim DirObj 
  Const INPROC = True 
  Const OUTPROC = False 
  Set DirObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/MyAppDir") 
  'Create an application in-process. 
  DirObj.AppCreate INPROC 
%> 
 
See Also

AppCreate2, AppDelete, AppDeleteRecursive, AppUnload, AppUnloadRecursive, AppGetStatus, AppDisable, AppDisableRecursive, AppEnable, AppEnableRecursive, AspAppRestart