Compartir a través de


IIsIPSecurity (ADSI)

The IIsIPSecurity object is a custom ADSI object that you can use to set access permissions by IP address and domain address.

The IIsIPSecurity Boolean property, GrantByDefault, determines if access by users is granted or denied by default.

If GrantByDefault is set to TRUE, all IP addresses and Internet domains are granted access, except those you specify to be denied. Use IPDeny and DomainDeny to deny access to specific IP addresses and domains.

Note

IPDeny and DomainDeny are only valid if GrantByDefault is set to TRUE.

If GrantByDefault is set to FALSE, all IP addresses and domains are denied access by default, except those you specify to be granted access. Use IPGrant and DomainGrant to grant access to specific IP addresses and domains.

Also note that IPGrant and DomainGrant are only valid if GrantByDefault is set to FALSE.

ADsPath

For the server's root virtual directory,

  • IIS:// MachineName/W3SVVC/ N/ROOT

where MachineName can be any name or LocalHost.

For a specific virtual directory,

  • IIS:// MachineName/W3SVC/ N/ROOT/ vdirName

where MachineName can be any name or LocalHost.

Syntax

varReturn = object. Method

Parameters

  • varReturn
    A variable that receives the return value from the method.

  • object
    A variable that contains the IIsIPSecurity object, usually as a result of a previous GetObject operation.

  • Method
    The object method chosen.

Valid Locations

Key type

Metabase path

IIsWebService (ADSI)

/LM/W3SVC/

IIsWebServer (ADSI)

/LM/W3SVC/1

IIsWebFile (ADSI)

/LM/W3SVC/1/ROOT/ vdirName/ text.htm

IIsWebDirectory (ADSI)

/LM/W3SVC/1/ROOT/ vdirName/ subdirectory

IIsFtpVirtualDir (ADSI)

/LM/MSFTPSVC/1/ROOT/ vdirName

IIsFtpService (ADSI)

/LM/MSFTPSVC/

IIsFtpServer (ADSI)

/LM/MSFTPSVC/1

IIsWebVirtualDir (ADSI)

/LM/W3SVC/1/ROOT/Samples

IIsIPSecurity Properties

IIsIPSecurity.IPDeny (ADSI)

This method accesses an array of IP addresses that are not allowed access to the server.

IIsIPSecurity.IPGrant (ADSI)

This method accesses an array of IP addresses that are allowed access to the server.

IIsIPSecurity.DomainDeny (ADSI)

This method accesses an array of domains that are not allowed access to the server.

IIsIPSecurity.DomainGrant (ADSI)

This method accesses an array of domains that are allowed access to the server.

IIsIPSecurity.GrantByDefault (ADSI)

This Boolean property determines if access is granted by default. If GrantByDefault is set to TRUE, you can use IPDeny and DomainDeny to deny access by specific IP addresses and domains. If GrantByDefault is set to FALSE, you can use IPGrant and DomainGrant to grant access by specific IP addresses and domains.

Note

This property is valid only when used in the context of the IIsIPSecurity object.

Metabase Properties

Windows ADSI Object Properties

A list of properties valid at multiple objects.

IPSecurity

This property specifies the IP access restrictions for a URL. It can be used to grant or deny access to client browsers based on either their IP address or DNS host name.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS