How to Get at Virtual Directories
Keywords: virtual directories dsGetChldPath Error 220 Unable to find ADSI paths of child/member objects
Question:
I can't seem to get a list of the virtual dirs in the metabase. Here's what I can do:I can get at the webs in the metabase like this:
for webnum = 1 to 600 w3svc/webnum nextbecause I know that the webs are numbers it's easy to identify them.But the virtual dirs are names, like this:
w3svc/12/root/dogdir ratdir catdir batdirI need to enumerate the virtual dirs and get at their properties. I can't seem to find a function in the adsi group to enumerate this list.Answer:
Have you tried using the dsGetChldPath(s1, s2) function?The first parameter should be a server object like:
IIS://MachineName/W3SVC/N/ROOTwhere MachineName can be any computer name or "LocalHost" and "N" a site number.The second parameter can be a blank string ("")or you could try the class name "IIsWebVirtualDir".
The return values should be a tab delimited list of the ADSI paths of the vdir objects of site N.
Use the "Path" property to get the physical path associated with the vdir.
Let us know if it works.
Question (cont'd):
Doesn't work. I tried it every which way. It always returns a Wil Extender error:Error 220 Unable to find ADSI paths of child/member objects.
I know that the adsipath has a virtual dir in it. I use the metabase editor to view the data.
Answer:
The problem is caused by the Microsoft supplied IIS, ADSI provider. It does not support some of the interfaces we use to analyze the parameters passed to the extender functions. The next version of the extender will contain modifications to take these limitations into account.
Article ID: W14517Filename: How to Get at Virtual Dirs.txt