DomainGrant

You can use the DomainGrant property of the IIsIPSecurity object to edit lists of domains that are allowed access to the server.

Syntax

SecObj.DomainGrant Domain

 

Parameters
SecObj
An IIS Admin Object of type IIsIPSecurity.
Domain
This is the domain you want granted access to the server.
Code Example
<% 
  Dim SecObj 
  Dim MyIPSec
  Dim IPList, DomainList
  Set SecObj = GetObject("IIS://LocalHost/W3SVC/1") 
  Set MyIPSec = SecObj.IPSecurity
  'Test value of MyIPSec.GrantByDefault here.
  DomainList = MyIPSec.DomainGrant
  IPList = MyIPSec.IPGrant
  Redim IPList (Ubound(IPList)+1)
  IPList (Ubound(IPList)) = "123.0.0.1,255.255.255.0"
  Redim DomainList (Ubound(DomainList)+1)
  DomainList (Ubound(DomainList)) = "somedomain.com"
  IPSec.DomainGrant = DomainList
  IPSec.IPGrant = IPList
  Set SecObj.IPSecurity = MyIPSec
  Ojb.Setinfo
%> 
 
See Also

IPDeny, IPGrant, DomainDeny, GrantByDefault, IIsIPSecurity