views:

174

answers:

0

Hello,

I am using the following code to loop through my websites in IIS:

DirectoryEntry root = new DirectoryEntry("IIS://localhost/W3SVC");
foreach (DirectoryEntry directory in root.Children)
{
    if (directory.SchemaClassName.Equals("IIsWebServer"))
    {
     // ...
    }
}

What I would like to do is use the available information to get the exact size of the directory of each website. Is this possible, and if so, how?

Thanks!