Export (0) Print
Expand All
Expand Minimize

IsapiCgiRestrictionSection Class [IIS 7 and higher]

IIS 7.0

Configures ISAPI and Common Gateway Interface (CGI) restrictions for a Web server that runs in ISAPI mode.

class IsapiCgiRestrictionSection : ConfigurationSectionWithCollection

The following table lists the methods exposed by the IsapiCgiRestrictionSection class.

Name

Description

Add

(Inherited from ConfigurationSectionWithCollection.)

Clear

(Inherited from ConfigurationSectionWithCollection.)

Get

(Inherited from ConfigurationSectionWithCollection.)

GetAllowDefinition

(Inherited from ConfigurationSection.)

GetAllowLocation

(Inherited from ConfigurationSection.)

Remove

(Inherited from ConfigurationSectionWithCollection.)

RevertToParent

(Inherited from ConfigurationSection.)

SetAllowDefinition

(Inherited from ConfigurationSection.)

SetAllowLocation

(Inherited from ConfigurationSection.)

The following table lists the properties exposed by the IsapiCgiRestrictionSection class.

Name

Description

IsapiCgiRestriction

An array of IsapiCgiRestrictionElement values that contain ISAPI or CGI restrictions.

Location

(Inherited from ConfigurationSection.) A key property.

NotListedCgisAllowed

A read/write boolean value. true if CGI restrictions that are not listed are allowed; otherwise, false. The default is false.

NotListedIsapisAllowed

A read/write boolean value. true if ISAPI restrictions that are not listed are allowed; otherwise, false. The default is false.

Path

(Inherited from ConfigurationSection.) A key property.

SectionInformation

(Inherited from ConfigurationSection.)

This class contains no subclasses.

ISAPI and CGI restrictions are request handlers that allow dynamic content to execute on a server. These restrictions are either CGI files (.exe) or ISAPI extensions (.dll). The Asp.dll and Aspnet_isapi.dll files are included by default. You can add custom ISAPI or CGI restrictions if the IIS configuration permits.

NoteNote:

If you are running IIS 7 in ISAPI mode, you can use ISAPI or CGI restrictions on your Web server. This feature is not available if you are running IIS 7 in integrated mode.

The following example shows the values for the NotListedCgisAllowed, NotListedIsapisAllowed, and Path properties, and it lists the contents of the IsapiCgiRestriction array property.

' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")

' Get the default Web site.
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")

' Get the ISAPI-CGI restriction section.
oSite.GetSection "IsapiCgiRestrictionSection", oSection

' Display the non-array IsapiCgiRestrictionSection properties.
WScript.Echo "ISAPI CGI Restriction Section"
WScript.Echo "-----------------------------"
WScript.Echo "Path: " & oSection.Path
WScript.Echo "NotListedCgisAllowed: " & _
    oSection.NotListedCgisAllowed
WScript.Echo "NotListedIsapisAllowed: " & _
    oSection.NotListedIsapisAllowed
WScript.Echo 

' Display the contents of the IsapiCgiRestriction array property.
WScript.Echo vbTab & "ISAPI CGI Restriction Elements"
WScript.Echo vbtab & "------------------------------"
For Each oIsapiCgiRestrictionElement In oSection.IsapiCgiRestriction
    WScript.Echo  vbtab & "GroupID: " & _
        oIsapiCgiRestrictionElement.GroupID
    WScript.Echo  vbtab & "Description: " & _
        oIsapiCgiRestrictionElement.Description
    WScript.Echo  vbtab & "Path: " & _
        oIsapiCgiRestrictionElement.Path
    WScript.Echo  vbtab & "Allowed: " & _
        oIsapiCgiRestrictionElement.Allowed
    WScript.Echo
Next

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

Community Additions

ADD
Show:
© 2014 Microsoft