string
public
{
System.DirectoryServices.DirectoryEntry IISSchema;
System.DirectoryServices.DirectoryEntry IISAdmin;
System.DirectoryServices.DirectoryEntry VDir;
IISSchema =
IISUnderNT =
IISAdmin =
IISAdmin.Invoke("Delete",
IISAdmin.CommitChanges();
}
sRet+=ex.Message;
VDir = IISAdmin.Children.Add(VDirName, "IIsWebVirtualDir");
VDir = IISAdmin;
VDir.Properties["AccessRead"][0] = chkRead;
VDir.Properties["AccessExecute"][0] = chkExecute;
VDir.Properties["AccessWrite"][0] = chkWrite;
VDir.Properties["AccessScript"][0] = chkScript;
VDir.Properties["AuthNTLM"][0] = chkAuth;
VDir.Properties["EnableDefaultDoc"][0] =
VDir.Properties["EnableDirBrowsing"][0] =
VDir.Properties["DefaultDoc"][0] =
VDir.Properties["Path"][0] = Path;
VDir.Properties["AppFriendlyName"][0]=VDirName;
VDir.Properties["AspEnableParentPaths"][0] =
VDir.CommitChanges();
VDir.Invoke("AppCreate",
VDir.Invoke("AppCreate", 1);
sRet+= "VRoot " +VDirName + " created!";