Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create A Virtual Directory Inside A Virtual Directory In
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01359105
Message ID:
01359182
Vues:
27
>
>I'm not sure how I would get that to work.
>
>Site.Add doesn't exist in intellisense.
>
>pvc.Add does, but it is looking for an object to be passed to it, so I'm not clear what I should pass to it.

It looks like you're not iterating over what I thought you were. You might be able to do this:
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()
   }
}
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform