Code to Manipulate Site Configuration Properties

Whenever a site configuration property used by the AuthManager object is changed, the cache storing these properties must be refreshed. For information on the SiteConfig object, see SiteConfig Object.

  1. Create a SiteConfig object and initialize it to the Retail site.

    Dim oSiteConfig
    Set oSiteConfig = Server.CreateObject("Commerce.SiteConfig")
    oSiteConfig.Initialize "Retail"
    
  2. Change the default time window to 90 seconds.

    oSiteConfig.Fields("Site CS Authentication").Value _
     .Fields("u_cookie_time_window").Value = 90
    
    oSiteConfig.SaveConfig
    
  3. Create and initialize an AuthManager object.

    Dim oAuthManager
    Set oAuthManager = Server.CreateObject("Commerce.AuthManager")
    oAuthManager.Initialize "Retail"
    
  4. Refresh the site cache.

    oAuthManager.Refresh "Retail"
    
  5. Release the objects.

    Set oSiteConfig = Nothing
    Set oAuthManager = Nothing
    

Copyright © 2005 Microsoft Corporation.
All rights reserved.