title | description | ms.date | ms.assetid |
---|---|---|---|
IsapiCgiRestrictionSection Class |
Configures ISAPI and Common Gateway Interface (CGI) restrictions for a Web server that runs in ISAPI mode. |
10/07/2016 |
c774177c-4c4b-8d8b-bfb4-b7b7cd985b65 |
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.
Note
If you are running [!INCLUDEiisver] in ISAPI mode, you can use ISAPI or CGI restrictions on your Web server. This feature is not available if you are running [!INCLUDEiisver] 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
ConfigurationSectionWithCollection
IsapiCgiRestrictionSection
Type | Description |
---|---|
Client | - [!INCLUDEiis70] on [!INCLUDEwinvista] - [!INCLUDEiis75] on [!INCLUDEwin7] - [!INCLUDEiis80] on [!INCLUDEwin8] - [!INCLUDEiis100] on [!INCLUDEwin10] |
Server | - [!INCLUDEiis70] on [!INCLUDEwinsrv2008] - [!INCLUDEiis75] on [!INCLUDEwinsrv2008r2] - [!INCLUDEiis80] on [!INCLUDEwinsrv2012] - [!INCLUDEiis85] on [!INCLUDEwinsrv2012r2] - [!INCLUDEiis100] on [!INCLUDEwinsrv2016] |
Product | - [!INCLUDEiis70], [!INCLUDEiis75], [!INCLUDEiis80], [!INCLUDEiis85], [!INCLUDEiis100] |
MOF file | WebAdministration.mof |
ConfigurationSectionWithCollection Class
IsapiCgiRestrictionElement Class