Hi,
I managed to set reference to the following after some search,
- Interop.ActiveDS.dll
- Interop.IISExt.dll
- Interop.IISOle.dll
I could now see properties such as IPGrant and so on under hints while programming, unlike before adding these references.
However, I still get the same error.
I could not find the "DirectoryEntry" type.
Dim SecObj As IISOle.IISBaseObject = GetObject("IIS://localhost/W3SVC/1/Root")
Dim MyIPSec As IISOle.IISIPSecurity = SecObj.IPSecurity()
MyIPSec.GrantByDefault = True
Dim IPList = MyIPSec.IPDeny
ReDim IPList(UBound(IPList) + 1)
IPList(UBound(IPList)) = "111.11.11.11,255.255.255.0"
MyIPSec.IPDeny = IPList
SecObj.IPSecurity = MyIPSec
SecObj.Setinfo()
At MyIPSec.IPDeny = IPList, under debugging mode, I can see that the IPDeny array was attached to MyIPSec successfully. But still it got stuck when setting the IPSecurity back to MyIPSec.
I'm not sure how to workabout to get rid of the latebinding error....