GlobalConfig2.CreateSiteConfig Method (PIA)

Use this method to create a site using the name specified in the bstrSiteName parameter. This method calls the SaveConfig method. This method is used primarily from Commerce Server Manager or by Commerce Server Site Packager. The correct ACLs are set on the entries in the Internet Information Services (IIS) metabase by Site Packager, to ensure that only site administrators can perform operations on the Admin objects.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Configuration
…
Public Function CreateSiteConfig(bstrSiteName As String) As ISiteConfig

[C#]

using Microsoft.CommerceServer.Interop.Configuration;
…
public ISiteConfig CreateSiteConfig(stringbstrSiteName);

Parameters

[Visual Basic .NET]

  • bstrSiteName
    A String that contains the new site name.

[C#]

  • bstrSiteName
    A string that contains the new site name.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns an object that implements the ISiteConfig interface that contains the site configuration settings.

[C#] This method returns a Microsoft.CommerceServer.Interop.Configuration.ISiteConfig interface for a SiteConfig object.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

The Initialize method must be called before this method can be called.

[Visual Basic .NET]

Example

' sMyNewSite is a string; oGlobalConfig is a Commerce GlobalConfig2 object
' oMSCSSiteConfig is a Commerce SiteConfig object
oMSCSSiteConfig = oGlobalConfig.CreateSiteConfig(sMyNewSite)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Configuration

Platforms: Windows 2000, Windows Server 2003

Assembly: CS_MSCSCfg (in cs_mscscfg.dll)

See Also

GlobalConfig2 Class

GlobalConfig2.DeleteSiteConfig

Copyright © 2005 Microsoft Corporation.
All rights reserved.