Therefore, I create the virtual directory in IIS 6.0 programmatically, but I follow the only MSDN documentation (or another) when creating the virtual directory, but the documentation I have in
http://msdn.microsoft.com/en-us/library/ms525598(VS.90).aspx
This is the reason that my virtual directory is an application in IIS. I tried to use the metabase properties page:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cde669f1-5714-4159-af95-f334251c8cbd.mspx?mfr=true
But in a sea of options, I'm not sure what properties I need to set in order 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();