Share via


How to Use the MinMaxShip Sample

The MinMaxShip sample can be found in the MinMaxShip directory of the Order Processing samples directory. For example, C:\Program Files\Microsoft Commerce Server\SDK\Samples\Order Processing\MinMaxShip. In the MinMaxShip directory, the Visual Basic code is in the folder named VB, and the C++ code is in the folder named ATL.

To build the Visual Basic sample

To build the Visual C++ ATL sample

To build the C# sample

To run the MinMaxShip sample

To build the Visual Basic sample

  1. Click Start, point to Programs, point to Microsoft Visual Studio, and then click Microsoft Visual Basic.
  2. On the File menu, click Open, and then navigate to the directory that contains the MinMaxShipVB.vbp file. For example, C:\Program Files\Microsoft Commerce Server\SDK\Samples\Order Processing\MinMaxShip\VB. Select the MinMaxShipVB.vbp file.
  3. On the File menu, click Make MinMaxShipVB.dll.
  4. After the project has been built, on the File menu, click Exit.

The Visual Basic MinMaxShip sample is now built on your computer.

To build the Visual C++ ATL sample

  1. Click Start, point to Programs, point to Microsoft Visual Studio, and then click Microsoft Visual C++.
  2. On the File menu, click Open, and then navigate to the directory that contains the MinMaxShip.dsw file. For example, C:\Program Files\Microsoft Commerce Server\SDK\Samples\Order Processing\MinMaxShip\ATL. Select the MinMaxShip.dsw file.
  3. On the Build menu, click Build MinMaxShip.dll.
  4. After the project has been built, on the File menu, click Save Workspace.
  5. To close the program, on the File menu, click Exit.

The ATL MinMaxShip sample is now built on your computer.

To build the C# sample

  1. Click Start, point to Programs, point to Microsoft Visual Studio .NET, and then click Microsoft Visual Studio .NET.

  2. On the Start page, click Open Project, and then navigate to the directory that contains the Commerce.csproj file. For example, C:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\Order Processing\MinMaxShip. Select the Commerce.csproj file, and then click Open.

  3. On the Build menu, click Build Solution.

  4. In the Save File As dialog box, accept the default settings, and then click Save.

  5. On the File menu, click Close Solution, and then click Exit.

  6. On the Start menu, point to Accessories, and then click Windows Explorer.

  7. Navigate to the folder C:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\Order Processing\MinMaxShip\CSharp\bin\Debug. Right-click CSSDKSample.dll, and then click Properties.

  8. In the CSSDKSample.dll Properties dialog box, select the Security tab, and then click the Add button.

  9. On the Look In menu, select the local computer name.

  10. In the Name column, select IUSR_ComputerName, click Add, and then click OK.

  11. Ensure that Read and Read & Execute are selected for the Internet Guest Account, and then click OK.

    The C# MinMaxShip sample is now built on your computer.

Running the Sample

To the MinMaxShip samples, you must first install one of the Microsoft Commerce Server 2002 Solution Sites. After you have installed one of these sites, go to the directory containing the Commerce Server Business Desk files, and perform the following procedure.

Commerce Server Solution Sites are available at https://go.microsoft.com/fwlink/?linkid=6491.

To run the MinMaxShip sample

  1. Copy the file MinMax_edit.asp from the BizDesk directory in the MinMaxShip directory to the Shipping directory in Business Desk on the installed site. For example, copy MinMax_edit.asp from C:\Program Files\Microsoft Commerce Server\SDK\Samples\Order Processing\MinMaxShip\BizDesk to C:\InetPub\wwwroot\RetailBizDesk\Shipping.

  2. Copy the file Shipping_methods.xml from the Business Desk directory in the MinMaxShip directory to the Config directory in Business Desk on the installed site. For example, copy Shipping_methods.xml from C:\Program Files\Microsoft Commerce Server\SDK\Samples\Order Processing\MinMaxShip\BizDesk to C:\InetPub\wwwroot\RetailBizDesk\Config.

  3. If you are running the Visual Basic sample, you must open the file MinMax_edit.asp, and change the following line of code:

    g_sProgID = "commerce.minmaxshipatl.1" 
    

    to

    g_sProgID = "commerce.MinmaxShipVB".
    

    Or, if you are running the C# sample, you must open the file MinMax_edit.asp, and change the following line of code:

    g_sProgID = "commerce.minmaxshipatl.1" 
    

    to

    g_sProgID = "Commerce.MinMaxShipCSharp".
    

    Ee823592.note(en-US,CS.20).gif Note

    • This step is not required for the Visual C++ ATL sample.

After the custom Shipping Method module is updated, you can use it to configure new shipment methods of the type "MinMaxShip."

See Also

Design

Copyright © 2005 Microsoft Corporation.
All rights reserved.