| 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
|