Share via


IIsWebDirectory.AppDeleteRecursive (ADSI)

You can use the AppDeleteRecursive method of the IIsWebDirectory (ADSI) or IIsWebVirtualDir (ADSI) object to delete Web application definitions from a metabase key and all subkeys. If the applications are running, they will be shut down. If the application is in-process with IIS, all resources associated with the application (such as out-of-process packages) will be released if the resource is not referenced by another in-process application.

note Note Server component DLLs are not released from in-process applications, even if they aren't currently referenced by other applications.

Deletions performed using AppDeleteRecursive cannot be undone.

Syntax

DirObj.AppDeleteRecursive

Parameters
  • DirObj
    An IIS ADSI object of type IIsWebDirectory or IIsWebVirtualDir.
Code Example
  <% 
  Dim DirObj 
  Set DirObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/MyAppDir") 
  'Delete the application at this directory 
  'and all subdirectories. 
  DirObj.AppDeleteRecursive 
%>