Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Fri, 22 Feb 2008 07:10:52 +0800,    group: microsoft.public.platformsdk.active.directory        back       


accessing IIS virtual directories and other directories programmatically   
Hi all,

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

url:http://www.ureader.com/gp/1633-1.aspx
date: Fri, 22 Feb 2008 07:10:52 +0800   author:   Steven

Re: accessing IIS virtual directories and other directories programmatically   
IIS is not part of Active Directory.  I think you are confusing the ADSI 
provider model with the fact that ADSI is called Active Directory Services 
Interface.  The name isn't really totally appropriate it.  ADSI uses a 
provider model to attempt to impose a similar domain model (IADs and its 
supporting cast) over the top of different types of stores. The main stores 
that are still supported are LDAP (AD, ADAM, etc.), WinNT (the local SAM 
account database on any Windows machine) and IIS (over the IIS metabase, 
which has had different persistence mechanisms in different versions of 
IIS).  In all cases, the ADSI provider is attempting to translate the ADSI 
domain model to underlying APIs such as LDAP, SAM and ABO (for IIS) and 
provide a scriptable way to access those functions that otherwise used to 
require C++ code.  .NET added an interop layer over ADSI, S.DS, which allows 
the same type of access to .NET clients.

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"  wrote in message 
news:ba56c564d2024b2cb0a637344f7f308a@newspe.com...
> Hi all,
>
> 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
>
> url:http://www.ureader.com/gp/1633-1.aspx
date: Fri, 29 Feb 2008 13:57:00 -0600   author:   Joe Kaplan

Re: accessing IIS virtual directories and other directories progra   
Hi,
  This is related to accessing the "windows Authetication" property of 
"Authentication" object of virtual directory,under which webservice is 
running.

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
date: Wed, 23 Apr 2008 21:57:00 -0700   author:   Deepak_DOTNET

Re: accessing IIS virtual directories and other directories progra   
Hi deepak,

I too have the same issue..
Have u found a solution?? if so kindly guide me..
Regards,
Udaya kumar

"Deepak_DOTNET" wrote:

> Hi,
>   This is related to accessing the "windows Authetication" property of 
> "Authentication" object of virtual directory,under which webservice is 
> running.
> 
> 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
>
date: Mon, 8 Sep 2008 21:21:01 -0700   author:   Udaya Kumar Udaya

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us