Need to create virtual directories from a MSI .dll. Code is working fine now but when I install on a clean machine it's defaulting to ASP version 1.1. Need to find a way to set to 2.0. Current code is below...
DirectoryEntry deRoot = new DirectoryEntry( "IIS://localhost/W3SVC/1/Root");
deRoot.RefreshC ache();
DirectoryEntry deNewVDir = deRoot.Children .Add("NewDir", "IIsWebVirtualD ir");
deNewVDir.Prope rties["Path"].Clear();
deNewVDir.Prope rties["Path"].Insert(0, NewDirPath);
deNewVDir.Commi tChanges();
deRoot.CommitCh anges();
deNewVDir.Invok e("AppCreate" , true);
deNewVDir.Commi tChanges();
deRoot.CommitCh anges();
deNewVDir.Close ();
deRoot.Close();
Any ideas?
DirectoryEntry deRoot = new DirectoryEntry( "IIS://localhost/W3SVC/1/Root");
deRoot.RefreshC ache();
DirectoryEntry deNewVDir = deRoot.Children .Add("NewDir", "IIsWebVirtualD ir");
deNewVDir.Prope rties["Path"].Clear();
deNewVDir.Prope rties["Path"].Insert(0, NewDirPath);
deNewVDir.Commi tChanges();
deRoot.CommitCh anges();
deNewVDir.Invok e("AppCreate" , true);
deNewVDir.Commi tChanges();
deRoot.CommitCh anges();
deNewVDir.Close ();
deRoot.Close();
Any ideas?
Comment