Groups | Blog | Home
all groups > iis security > november 2004 >

iis security : ADSI navigation to directories (not web directories)


Raghu
11/13/2004 10:45:03 AM
How can I get a list of directories (not web directories) through ADSI in a
web virtual directory so that I can set SSL permissions on them?

For example:
The virual directory 'MyVirDir' is mapped to C:\MyApp in default web site.
The physical structure of file system at C:\MyApp is:
SubDir1
SubDir1File1.html
SubDir1File2.html
SubDir2
SubDir2File1.html
Default.html

In virtual directory MyVirDir, the SubDir1 and SubDir2 are not web
directories. They are simple physical directories so user can navigate to
the url: https://myserver/MyVirDir/SubDir1/SubDir1File1.html

Here are the paths I used in ADSI objects:

IIS://MyServer/W3SVC/1/ROOT/MyVirDir (Works for virtual directory)
IIS://MyServer/W3SVC/1/ROOT/MyVirDir/SubDir1 (Does not work for SubDir1
directory)

The last path does work when I make SubDir1 the web directory. But I don't
want to make it web directory.

I need to set SSL flags on SubDir1. I can do this with IIS admin tool. How
can I achieve same thing with ADSI?

I appreciate any help.

Details:
OS: Windows 2003 server
Using DirectoryEntry object in .NET 1.1

Raghu/..

Ken Schaefer
11/16/2004 9:56:39 PM
I don't think there is an ADSI provider to query the physical file system.
You will need to use something else (eg File System Object) to get the list
of directories.

Until a physical folder has different properties to its parent folder there
will be no entry for it in the IIS Metabase. Once you have worked out the
folder name, you'll need to create the appropriate entry in the metabase
(using IIS ADSI provider or WMI), and then set the SSL required flag.

Cheers
Ken


[quoted text, click to view]

AddThis Social Bookmark Button