C
chenggf
Hi All.
I has been successful to Create the virtual directory of "mytest" with the
function of "Create()",but I don't delete the "mytest"
with the function of "delete1()" or "delete2()" or "delete3()" or
"delete4()"
Thanks all.
chenggf
Public sub Create()
Dim strPath As String = "IIS://localhost/W3SVC/1/ROOT/mytest"
Dim newVirDir As DirectoryEntry =
rootfolder.Children.Add(mytest, "IIsWebVirtualDir")
newVirDir.Invoke("AppCreate", True)
newVirDir.CommitChanges()
rootfolder.CommitChanges()
end sub
public sub delete1()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebVirtualDir")
de.Invoke("AppDelete", True)
de.DeleteTree()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebDirectory")
de.Invoke("AppDelete", True)
de.DeleteTree()
end sub
public sub delete2()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebDirectory")
de.Invoke("AppDelete", True)
de.DeleteTree()
end sub
public sub delete2()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebDirectory")
de.Invoke("AppDelete", True)
de.DeleteTree()
end sub
public sub delete3()
paras(0) = "IIsWebVirtualDir"
paras(1) = "mytest"
rootfolder.Invoke("Delete", paras)
rootfolder.CommitChanges()
end sub
public sub delete4()
paras(0) = "IIsWebDirectory"
paras(1) = "mytest"
rootfolder.Invoke("Delete", paras)
rootfolder.CommitChanges()
end sub
I has been successful to Create the virtual directory of "mytest" with the
function of "Create()",but I don't delete the "mytest"
with the function of "delete1()" or "delete2()" or "delete3()" or
"delete4()"
Thanks all.
chenggf
Public sub Create()
Dim strPath As String = "IIS://localhost/W3SVC/1/ROOT/mytest"
Dim newVirDir As DirectoryEntry =
rootfolder.Children.Add(mytest, "IIsWebVirtualDir")
newVirDir.Invoke("AppCreate", True)
newVirDir.CommitChanges()
rootfolder.CommitChanges()
end sub
public sub delete1()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebVirtualDir")
de.Invoke("AppDelete", True)
de.DeleteTree()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebDirectory")
de.Invoke("AppDelete", True)
de.DeleteTree()
end sub
public sub delete2()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebDirectory")
de.Invoke("AppDelete", True)
de.DeleteTree()
end sub
public sub delete2()
Dim de As DirectoryEntry = rootfolder.Children.Find("mytest",
"IIsWebDirectory")
de.Invoke("AppDelete", True)
de.DeleteTree()
end sub
public sub delete3()
paras(0) = "IIsWebVirtualDir"
paras(1) = "mytest"
rootfolder.Invoke("Delete", paras)
rootfolder.CommitChanges()
end sub
public sub delete4()
paras(0) = "IIsWebDirectory"
paras(1) = "mytest"
rootfolder.Invoke("Delete", paras)
rootfolder.CommitChanges()
end sub