So I am creating a virtual directory in IIS 6.0 programmically, but I am following the only MSDN (or other) documentation on creating a virtual directory, but the documentation I have at
http://msdn.microsoft.com/en-us/library/ms525598(VS.90).aspx
Is causing my virtual directory to be an application in IIS. I was trying to use the metabase properties page:
But in the sea of options I am not sure what properties I need to set to stipulate it strictly as a virtual directory:
DirectoryEntries vdirs = site.Children;
DirectoryEntry newVDir = vdirs.Add(vDirName, (className.Replace("Service", "VirtualDir")));
newVDir.Properties["Path"][0] = phyPath;
newVDir.Properties["AccessScript"][0] = true;
newVDir.Properties["AppFriendlyName"][0] = vDirName;
newVDir.Properties["AppIsolated"][0] = "0";
newVDir.Properties["AppRoot"][0] = "/LM" + metaBaseFullPath.Substring(metaBaseFullPath.IndexOf("/", ("IIS://".Length)));
newVDir.CommitChanges();