I have a need to access the virtual directories and other directories that
fall under an IIS website and change certain properties using c#. I use the
System.DirectoryServices and can get the root virtual directory using the
following string "IIS://testServer/W3SVC/1/Root/". I can then loop through
all virtual directories and application under this web server. What I can't
do is access a subdirectory that has not been designated as either virtual
directory or an application in IIS.
Now to my question, since I know that IIS is actualy part of active
directory is there any other way to get to and change the properties of a
normal directory that is under a virtual directory. I hope I made myself
clear.
Thanks in advance to all the gurus out there
Steven
So, your IIS settings are stored in the metabase (unless you use IIS 7, in
which case there is a new serialization format based on configuration
files), not in AD. The IIS provider is translating your requests into lower
level calls into ABO that manipulate the metabase.
That said, I think the IISWebDirectory interface is the IIS extension to
ADSI that provides you with what you are looking for. There is a pretty
decent discussion on using ADSI for programmatic administration of IIS in
the IIS SDK docs.
Best of luck!
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Steven" <ste...@naspam.com> wrote in message
news:ba56c564d2024b2c...@newspe.com...
I have webservice running under virtual directory.I want to programatically
check Whether the "Windows Authentication" under "Authentication" folder of
virtual directory is enabled or not.
I need to check this in c# or vb.net.
Can u please me code to accessing those object programatically.It would
great if some body give me code to do that..
Thanks,
Deepak
I too have the same issue..
Have u found a solution?? if so kindly guide me..
Regards,
Udaya kumar