AdminSite.Status Property

The Status property is a Boolean indicating whether the Commerce Server site is open or closed. In addition, when its value is set, it either opens or closes the Commerce Server site. The function closes the site by writing the value of the Site.CloseRedirectURL property into the HttpRedirect property of the metabase, and opens the site by clearing the HttpRedirect property.

Examples

The following example opens a Commerce Server site:

Set CurSite = Server.CreateObject("Commerce.AdminSite")
Call CurSite.Initialize("1", "Clocktower")
CurSite.Status = True

The following example checks the status of the Commerce Server site and saves the text Open or Closed in a variable called statusMsg. (If the attempt to read the Status Boolean fails, as might happen if permission to a file were denied or a directory did not exist, then statusMsg will contain the text Invalid.)

REM -- check site status
On Error Resume Next
curStatus = CurrSite.status
if Err.Number = 0 then
    if curstatus = TRUE then
        statusMsg = "Open"
    else
        statusMsg = "Closed"
    End If
Else
    statusMsg = "Invalid"
    Err.Clear
End if

© 1997-1998 Microsoft Corporation. All rights reserved.