IIsWebDirectory.AppCreate (ADSI)
You can use the AppCreate method of the IIsWebDirectory (ADSI) or IIsWebVirtualDir (ADSI) 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.AppCreateInProcFlag
Parameters
- DirObj
An IIS ADSI 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
%>
Related Topics
- For information on other methods in the IIsWebDirectory object, see IIsWebDirectory (ADSI).