IIS Server Security - Setting IpSecurity for physical directory

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server Security > October 2004 > Setting IpSecurity for physical directory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Setting IpSecurity for physical directory
Sebastien Nadeau

2004-10-15, 9:25 pm

Hi,

Using VBScript I'm able to set IpSecurity for a virtual directory in
IIS6, but not for a physical directory. MSDN explicitly specify that
it is possible to set this property for both virtual and physical
directories. I'm puzzled. Example script:

_BEGIN_
Dim SecObj
Dim MyIPSec
Dim IPList
Set SecObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/MyDir")
Set MyIPSec = SecObj.IPSecurity
If (TRUE = MyIPSec.GrantByDefault) Then
MyIPSec.GrantByDefault = FALSE
End If
IPList = MyIPSec.IPGrant
ReDim IPList(1)
IPList (0) = "123.123.0.0,255.255.0.0"
MyIPSec.IPGrant = IPList
SecObj.IPSecurity = MyIPSec
SecObj.Setinfo
_END_

This works for a Virtual Dir (and even for ROOT), but when running it
against a Physical Dir, I run into the following error message:

Code 80070003
The system cannot find the path specified.

The physical directory is there, but not in the XML Metabase. I wonder
what I'm doing wrong.

Sébastien Nadeau
Technicien en informatique
Bibliothèque de l'Université Laval

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com