AdminWebServer.GetWebSiteProperties
Use this method to retrieve, given a server instance, the properties of a site as name/value pairs in a Dictionary object.
Definition
Function GetWebSiteProperties(bstrInstance As String) As Object
Parameters
bstrInstance
A numeric value, expressed as a String, representing a server instance for a site.
Return Values
This method returns a reference to a Dictionary object containing the properties of the specified site.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
<%
' Create AdminWebServer object
Set objWebServer = CreateObject("Commerce.AdminWebServer")
' Get Web sites
WebSites = objWebServer.GetWebSites
For WebInstance = LBound(WebSites, 1) To UBound(WebSites, 1)
' Return its properties in a dictionary
Set objDict = objWebServer.GetWebSiteProperties(WebSites(WebInstance))
' Enumerate and display the dictionary
For Each property in objDict
Response.Write property & " = " & objDict.value(property) & "<br>"
next
Next
' Destroy objects
Set objDict = Nothing
Set objWebServer = Nothing
%>