>DirectoryEntry virtualDir = IISAdmin.Children.Find("Root", "IIsWebVirtualDir"); >foreach (DirectoryEntry dirs in virtualDir.Children) >{ > Console.WriteLine(dirs.Path); > // Change to real name of virtual directory you want to add a sub directory for > if (dirs.Path == "IIS://localhost/W3SVC/1/IISHelp") > { > // dirs.Children.Add() > } >} >Hi,
DirectoryEntry virtualDir = IISAdmin.Children.Find("Root", "IIsWebVirtualDir");I get the error "The system cannot find the path specified".