WebSvcExtRestrictionList

The WebSvcExtRestrictionList property contains a multi-string list of ISAPIs and CGIs used by applications on the Web server, including their location, descriptive information, and a flag for determining whether the Web service extension is enabled or disabled. The WebSvcExtRestrictionList property is used by the Web server to determine whether an ISAPI extension is permitted to run.

Each string element is written as:

AllowDenyFlag,ExtensionPath,UIDeletableFlag,GroupID,ApplicationName
  • AllowDenyFlag is "0" if the extension is not allowed or "1" if the extension is allowed.

  • ExtensionPath is the full path to the extension. If the last four characters of the physical path are ".dll" (case insensitive), then the extension is an ISAPI, otherwise it is a CGI. In the case of CGI script mappings, the physical path must contain the physical path from the mapping (i.e. "c:\windows\system32\cmd.exe %s %s").

  • UIDeletableFlag is "1" if the UI is allowed to delete the extension from the list or "0" if the UI is not allowed to delete it.

  • GroupID is a non-localizable string used to identify groups of extensions.

  • ApplicationName is a localizable description of the extension.

Some examples of elements in this property are shown below. The first two entries, for *.dll and *.exe are special cases, referring to 'All Unlisted ISAPIs' and 'All Unlisted CGIs', respectively. The Web server core enables or disables all ISAPIs or all CGIs depending on the setting, if these entries are present:

   "0,*.dll" 
   "0,*.exe" 
   "0,c:\windows\system32\inetsrv\asp.dll,0,ASP,Active Server Pages" 
   "0,c:\windows\system32\inetsrv\httpodbc.dll,0,HTTPODBC,Internet Data Connector" 
   "0,c:\windows\system32\inetsrv\ssinc.dll,1,SSINC,Server Side Includes"

Configuring the WebSvcExtRestrictionList property with Admin Base Object (ABO) can be risky because the format of the property must be perfect. The property is represented as a buffer of strings that are delimited by \0 and composed of 5 fields separated by commas. A safer way to configure this property is by using the extension-related ADSI and WMI methods of the IIsWebService object, such as the AddExtensionFile and DeleteExtensionFileRecord methods.

For code examples that configure extensions, see Adding Web Service Extensions to the Restriction List.

Schema Attributes

Attribute Name

Value

ADSI/WMI Data Type

MULTISZ

ABO Data Type

MULTISZ_METADATA

Schema Default

Not specified.

Internal Default

0,*.dll

0,*.exe

Upper Bound

Not specified

Lower Bound

Not specified

Internal ID

2168

Friendly ID

MD_WEB_SVC_EXT_RESTRICTION_LIST

Property Attributes

NO_ATTRIBUTES

User Type

IIS_MD_UT_SERVER

Configurable Locations

You can configure this property at the following locations in the IIS metabase.

Metabase Path

IIS Admin Object Type

/LM/W3SVC

IIsWebService

Flags

There are no flags for this property.

Example Code

Metabase properties can be configured programmatically using three different technologies in various different languages (see Comparison of IIS Administration Features). For basic code examples, see the sections under Using IIS Programmatic Administration. More complicated, task-based code examples are provided in Using IIS.

The following code example configures the WebSvcExtRestrictionList property to enable ASP scripts to be executes. This example uses ADSI in VBScript.

Dim lWebSvcExtRestrictionList 
Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC") 

' Store original value: 
lWebSvcExtRestrictionList = IIsWebServiceObj.Get("WebSvcExtRestrictionList") 

WScript.Echo "Before: WebSvcExtRestrictionList=" 
For ValueIndex = 0 To UBound(IIsWebServiceObj.WebSvcExtRestrictionList) 
  WScript.Echo IIsWebServiceObj.Get("WebSvcExtRestrictionList")(ValueIndex) 
Next 

' Enable ASP: 
IIsWebServiceObj.EnableWebServiceExtension "ASP" 
IIsWebServiceObj.SetInfo 

WScript.Echo "After: WebSvcExtRestrictionList=" 
IIsWebServiceObj.GetInfo 
For ValueIndex = 0 To UBound(IIsWebServiceObj.WebSvcExtRestrictionList) 
  WScript.Echo IIsWebServiceObj.Get("WebSvcExtRestrictionList")(ValueIndex) 
Next 

' Restore to original value: 
IIsWebServiceObj.Put "WebSvcExtRestrictionList", lWebSvcExtRestrictionList 
IIsWebServiceObj.SetInfo 

WScript.Echo "Restored: WebSvcExtRestrictionList=" 
For ValueIndex = 0 To UBound(IIsWebServiceObj.WebSvcExtRestrictionList) 
  WScript.Echo IIsWebServiceObj.Get("WebSvcExtRestrictionList")(ValueIndex) 
Next 

Requirements

Server: Requires or Windows Server 2003.

Product: IIS

See Also

Concepts

ApplicationDependencies

Adding Web Service Extensions to the Restriction List

Installing and Uninstalling CGI and ISAPI Extensions

Comparison of IIS Administration Features

Using IIS Programmatic Administration