How to use the CSWebTool.exe to add or to remove Web Servers from a SharePoint Web Farm that hosts Commerce Server 2009 Web sites

A new command-line tool is now available. This tool lets you add or remove a Web server in an existing SharePoint Web farm that serves Microsoft Commerce Server 2009 Web sites.

Consider the following scenario:
  • You run the Commerce Server 2009 Configuration Wizard to create a Web site.
  • You try to add a new Web server to create a Web farm that serves Commerce Server 2009 Web sites.
In this scenario, you may not have found any effective tools for adding the server.
More information
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

To download Commerce Server 2009 Template Pack for SharePoint 2010, visit the following Microsoft website:


To apply this hotfix, you must have Commerce Server 2009 or Commerce Server 2009 Template Pack for SharePoint 2010 installed.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For Commerce Server 2009 RTM
File nameFile versionFile sizeDateTimePlatform
For Commerce Server 2009 Template Pack for SharePoint 2010
File nameFile versionFile sizeDateTimePlatform

After you apply this hotfix, the command-line tool CSWebTool.exe helps you add or remove Web servers in a SharePoint Web farm that serves Commerce Server 2009 Web sites. The CSWebTool.exe tool is usually located in the following directories:
  • 32-bit operating systems

    C:\Program Files\Microsoft Commerce Server 2007\Microsoft Commerce Server 2009\Site
  • 64-bit operating systems

    C:\Program Files (x86)\Microsoft Commerce Server 2007\Microsoft Commerce Server 2009\Site

Important considerations before you use this tool

Before you use this tool, you should note the following considerations:
  • The tool must be run on a server either that you want to add to the farm or that is already in the farm.
  • The tool must be run on a computer where the Commerce Server core is installed and where the connection string to Commerce Server Admin DB is configured correctly in Commerce Server Manager.
  • The tool does not enable the removal of the last Web server or the removal of the only Web server from the Commerce Server application. The tool also does not enable the addition of Web servers to an empty Commerce Server application.

How to use this tool

To use this tool, refer to the following code sample:
CSWebTool -CSSitename <site name> -ApplicationName <application name> -WebSiteName <Web site name> [ -Help | -H | -WebServerName <Web server name> | -Port <port number> | -Remove]
You can use this tool together with the following options:

-Help or -H
displays the help message
the Commerce Server Site name
the Web application name (also called "resource name" in Commerce Server Admin DB)
the name of the IIS Website which hosts the Web application
the machine name of the Web server is being added to the existing application. Default is the machine name where this tool is being run.
the port number for the IIS Website. Default is 80.
removes the Web server (without -remove, assumes for adding)

To register a new Web server by using Commerce Server, refer to the following example:
> CSWebTool -CSSitename DefaultSite -ApplicationName DefaultSite-81Home -WebSiteName "Default Web Site"
To unregister a new Web server by using Commerce Server, refer to the following example:
> CSWebTool -CSSitename DefaultSite -ApplicationName DefaultSite-81Home -WebSiteName "Default Web Site" -Remove
  • These options are not case-sensitive. Their values (the strings that follow the parameters) are case-sensitive, except for the value for -WebServerName. This value is not case-sensitive.
  • If the values contain spaces, quotation marks are required to wrap the values.
  • After the new server is added, visit Commerce Server Manager. Then, right-click the affected Web site to synchronize the values in order to make sure that the new entries contain the correct values for the server that is added.
For more information about how to configure SharePoint Commerce Services on Web servers, visit the following Microsoft Developer Network (MSDN) Web site:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Article ID: 973050 - Last Review: 09/22/2013 06:27:00 - Revision: 3.0

Microsoft Commerce Server 2009 Enterprise, Microsoft Commerce Server 2009 Standard

  • kbautohotfix kbexpertiseadvanced kbsurveynew kbqfe KB973050