Wrox Home  
Search P2P Archive for: Go

  Return to Index  

iis_applications thread: Create IIsWebVirtualDir


Message #1 by a844001@m... on Tue, 4 Sep 2001 07:38:43
One question about how to create IIsWebVirtualDir in vb.Net ?
My code:
        Dim objDirEnt As DirectoryEntry = New DirectoryEntry
        ("IIS://localhost/W3SVC/1/Root")
        Dim ChildEnt As DirectoryEntry
        objDirEnt.UsePropertyCache = True
        Dim objChild As DirectoryEntry = objDirEnt.Children.Add
        ("TestDir", "IIsWebVirtualDir")
        objChild.CommitChanges()
        objChild.Properties("Path")(0) = "C:\Inetpub\wwwroot"
        objChild.Properties("AccessWrite")(0) = False
        objChild.Properties("AccessRead")(0) = True
        objChild.Properties("ContentIndexed")(0) = False
        objChild.Properties("EnableDefaultDoc")(0) = True
        objChild.Properties("AccessScript")(0) = True
        objChild.Properties("KeyType")(0) = "IIsWebVirtualDir"
        objChild.Properties("EnableDirBrowsing")(0) = False
        objChild.Properties("AppFriendlyName")(0) = Name
        objChild.Invoke("AppCreate", True)
        objChild.CommitChanges()
    End Sub

ˇ·My Problem is the "TestDir" is not empty. it contains much defult
  VirtualDir why? Could someone tell Me How to do? TksˇI

  Return to Index