Share via


Code to Dump Configuration Values

In this example, an instance of the AppConfig object is instantiated, then initialized to the name of the installed site (in this case, "Retail"). The GetOptionsDictionary method is called, and each key/value pair in the dictionary is written to the Web page.

The ASP example code follows.

  1. Create the AppConfig object instance and initialize it to the name of the installed site. In this example, a site named "Retail" already exists.

    Dim MSCSAppConfig
    Set MSCSAppConfig = Server.CreateObject("Commerce.AppConfig")
    MSCSAppConfig.Initialize("Retail")
    
  2. Create a dictionary object to hold the return value of the GetOptionsDictionary method, and dump the dictionary contents to the Web page.

    Dim dConfig 
    set dConfig = MSCSAppConfig.GetOptionsDictionary("")
    For Each sKey in dictConfig
        Response.Write sKey & " = " & dConfig.Value(sKey) & "<br>"
    Next
    


All rights reserved.