Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create A Virtual Directory Inside A Virtual Directory In
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01359105
Message ID:
01359182
Views:
28
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform