Add Site Operators programmatically (IIS Admin Objects) 
Author Message
 Add Site Operators programmatically (IIS Admin Objects)

How can I add Web-Site Operators using Visual Basic?
I got to the point where I get the Dacl and add a new Ace (see code below).
But when I try to write the Acl back to the IIsWebServer-Object(last two
lines), an error occurs (object doesnt support this method). I tried the
same via PutEx, but that didnt work either. If I dont do it, the new Ace
is existent in the dACL-object, but not in the WWWServer.AdminACL property.

Does anyone know how to do it?


Code (I left out the Dims for better reading):
Set WWWServer = GetObject("IIS://ServerName/w3svc/1")
Set ACList = WWWServer.AdminACL
Set dACL = ACList.DiscretionaryACL
Set NewAce = CreateObject("AccessControlEntry")
NewAce.Trustee = "Domain\Account"
NewAce.AccessMask = 11
NewAce.AceFlags = 0
NewAce.AceType = 0
dACL.AddAce NewAce

WWWServer.AdminACL = ACList

Sun, 29 Jul 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How can I programmatically add a website to IIS 5.0 on Win2000

2. IIS Admin Object with .NET

3. IIS Admin Object Reference??

4. IIS Admin Object

5. IIS Admin Objects

6. IIS Admin Objects - PLEASE HELP!

7. Want to admin IIS app object from VB

8. Add FTP site operators using ADSI and VBscript

9. IIS Admin Objects - PLEASE HELP!

10. iis admin object

11. iis admin object

12. Documentation for IIS admin objects available?


Powered by phpBB® Forum Software