Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
IIS 6.0 SDK
IIS ADSI Provider
 IIsWebService.ListExtensionFiles (A...
Collapse All/Expand All Collapse All
IIsWebService.ListExtensionFiles (ADSI)

The ListExtensionFiles method returns an array of strings containing the Web service extension file names in the WebSvcExtRestrictionList metabase property that can be enabled on the server.

NoteNote:

This method is only available on IIS 6.0 or later.

Visual Basic
objIIsWebService.ListExtensionFiles As VARIANT

This method has no parameters.

An array of strings containing the list of files. In other words, an array of second tokens in the WebSvcExtRestrictionList metabase property.

The following example shows you how to use the VBScript programming language to display the Web service extension restriction list, display the application dependencies, list the available extension files that are installed on the server, and state if ASP is enabled or disabled.

VBScript
Dim aWebSvcExtRestrictionList 
Dim aApplicationDependencies 
Dim aExt 
Dim sExt 
aExt = Array() 
aWebSvcExtRestrictionList = Array() 
aApplicationDependencies = Array() 
Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC") 

' Store original value: 
aWebSvcExtRestrictionList = IIsWebServiceObj.WebSvcExtRestrictionList 

WScript.Echo 
WScript.Echo "WebSvcExtRestrictionList property:" 
' For each extension record, 
For Each i in aWebSvcExtRestrictionList 
  WScript.Echo(i) 
Next 

' Store original value: 
aApplicationDependencies = IIsWebServiceObj.Get("ApplicationDependencies") 

WScript.Echo 
WScript.Echo "ApplicationDependencies property:" 
' For each extension record, 
For ValueIndex = 0 To UBound(IIsWebServiceObj.ApplicationDependencies) 
  WScript.Echo IIsWebServiceObj.Get("ApplicationDependencies")(ValueIndex) 
Next 

WScript.Echo 
' For each extension record, 
For ValueIndex = 0 To UBound(IIsWebServiceObj.WebSvcExtRestrictionList) 

  sExt = IIsWebServiceObj.Get("WebSvcExtRestrictionList")(ValueIndex) 

  If ( 0 < (InStr(sExt, "asp.dll")) ) Then 
If ("0" = Left(sExt, 1)) Then  
WScript.Echo "ASP is disabled" 
Elseif ("1" = Left(sExt, 1)) Then  
WScript.Echo "ASP is enabled" 
Else  
WScript.Echo "ASP is set to an unexpected value" 
End If 
  End If 
Next 

WScript.Echo 
WScript.Echo "ListExtensionFiles method:" 
aExt = IIsWebServiceObj.ListExtensionFiles 
For ValueIndex = 0 To UBound(aExt) 
  WScript.Echo aExt(ValueIndex) 
Next 

Server: Requires or Windows Server 2003.

Product: IIS

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker