G
Glenn Leifheit
I am recieving the following error: Unknown error (0x80005000) when trying
to add a virtual directory. Any help would be appreciated, my code follows.
Thanks
Glenn
Sub create(ByVal strComputer As String, ByVal strProject As String)
Dim strIISPath As String
strIISPath = "IIS:\\P88728\W3SVC\1\ROOT\"
Dim objIISDE As DirectoryEntry
Dim objIISDC As DirectoryEntries
Dim objVDir As DirectoryEntry
objIISDE = New DirectoryServices.DirectoryEntry(strIISPath)
objIISDC = objIISDE.Children
objVDir = objIISDC.Add("test", objIISDE.SchemaClassName())
objVDir.CommitChanges()
objVDir.Properties("Path")(0) = "c:\temp"
objVDir.CommitChanges()
End Sub
to add a virtual directory. Any help would be appreciated, my code follows.
Thanks
Glenn
Sub create(ByVal strComputer As String, ByVal strProject As String)
Dim strIISPath As String
strIISPath = "IIS:\\P88728\W3SVC\1\ROOT\"
Dim objIISDE As DirectoryEntry
Dim objIISDC As DirectoryEntries
Dim objVDir As DirectoryEntry
objIISDE = New DirectoryServices.DirectoryEntry(strIISPath)
objIISDC = objIISDE.Children
objVDir = objIISDC.Add("test", objIISDE.SchemaClassName())
objVDir.CommitChanges()
objVDir.Properties("Path")(0) = "c:\temp"
objVDir.CommitChanges()
End Sub