Auction Sitelet

Location in SDK: SDK\Samples\Auction

The primary goal of the Auction Sitelet is to demonstrate through code how to use the Auction component to implement Winning Bid auctions. It includes a custom Commerce Server Business Desk module, Auction, designed for managing auctions.

The Auction Sitelet consists of a package file, which you unpack using Commerce Server Site Packager. The source code for the sitelet is included in this package. No modification to the code is required to deploy the Auction Sitelet to a server running Commerce Server 2002.

Best coding practices are maintained in this sample, and the code represents the prescribed method of using the object model.

Installing the Auction Sitelet

You unpack the Auction Sitelet using Commerce Server Site Packager. The package file is located in the following directory:

<drive>:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\Auction\SDK-AUCTION-SITELET.PUP

Unpacking the Auction Sitelet using the Custom unpack option and creating independent databases for each of the site resources is not recommended.

Use the following procedures to install the Auction Sitelet on one computer using the Quick mode in Site Packager.

Before installing the Auction Sitelet, the Auction pipeline component must be built and registered. For instructions about building and registering the Auction pipeline component, see Auction Component.

To unpack the Auction Sitelet

To add a blank Business Desk to the Auction Sitelet

To add the Auction Module to Business Desk

To create an auction

To bid on an auction item

To view bid history in Business Desk

To unpack the Auction Sitelet

  1. In Windows Explorer, navigate to the <drive>:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\Auction directory.

  2. Double-click the SDK-AUCTION-SITELET.PUP icon.

  3. In the Unpack screen, select Quick Unpack, and then click Next.

  4. In the Quick Unpack screen, ensure that the SQL Server computer name is correct, enter the SQL Server login name and password, and then click Next.

  5. In the Commerce Server Site Packager window recommending Windows Authentication, click OK.

    By default, the sitelets do not work with Windows Authentication. For more information about configuring the sitelets to work with Windows Authentication, see step 6 in Deploying Commerce Server Using Windows Authentication.

  6. In the Profiling System screen, accept the defaults, and then click Next.

  7. In the second Profiling System screen, accept the defaults, and then click OK.

  8. In the Unpacking is complete screen, review the list of SQL databases and Internet Information Services (IIS) applications that were created. To review the list of events that occurred while Site Packager was running, click View Log File.

  9. To close Site Packager, click Finish.

To add a blank Business Desk to the Auction Sitelet

  1. Click Start, point to Programs, point to Microsoft Commerce Server 2002, and then click Commerce Server Manager.
  2. In Commerce Server Manager, on the Tree tab, expand Commerce Server Manager, expand Commerce Sites, and then expand Auction Sitelet.
  3. Right-click Applications, point to New, and then click Add Application.
  4. In the Add Application From dialog box, select Blank.pup, and then click Open.
  5. In the Select Applications dialog box, in the Applications in the package box, clear the BlankSite option. Only the BlankBizDesk site option should be selected.
  6. Click Next.
  7. In the Select IIS Web Sites and Virtual Directories dialog box, do the following:
    Use this To do this
    Machine Name of IIS Server Type the computer name for the IIS server.
    IIS Web site Select the Default Web Site from the drop-down list.
    IIS Virtual Directory Type auctionsiteletbizdesk where blankbizdesk currently appears.
  8. Click Next.
  9. In the Unpacking is complete dialog box, review the list of SQL databases and IIS applications that were created. To review the list of events that occurred while Site Packager was running, click View Log File.
  10. To close Site Packager, click Finish.
  11. To close Commerce Server Manager, in the Commerce Server Manager screen, on the Console menu, click Exit.
  12. In the Microsoft Management Console dialog box, click No.

To add the Auction module to Business Desk

  1. Click Start, point to Microsoft Commerce Server 2002, and then click Software Development Kit.
  2. Navigate to <drive>:\Samples\Auction\bBizdesk\Config, and copy the Auction.xml and Bizdesk.xml files.
  3. Navigate to <drive>:\Inetpub\wwwroot\Auctionsiteletbizdesk\Config, and paste the Auction.xml and Bizdesk.xml files into this directory.
  4. Navigate to <drive>:\Program Files\Microsoft Commerce Server\SDK\Samples\Auction\Bizdesk, and copy the Include directory, Auction_edit.asp, Auction_event.asp, Auction_list.asp, Bids_event.asp, and Bids_list.asp. The only item that should not be copied is the Config folder.
  5. Navigate to <drive>:\Inetpub\wwwroot\auctionsiteletbizdesk, and on the File menu, point to New, and then click Folder.
  6. In the right pane, name the new folder auction.
  7. Double-click the auction folder, and paste the copied files into the auction folder. The auction folder should now contain the files auction_edit.asp, auction_event.asp, auction_list.asp, bids_event.asp, bids_list.asp, and an Include directory.
  8. Click Start, and then click Run.
  9. In the Run dialog box, in the Open box, type iisreset, and then click OK.

A command box appears while IIS is being reset. IIS is reset when the command box closes.

To create an auction

  1. Click Start, point to Programs, and then click Internet Explorer.

  2. In Internet Explorer, in the Address box, type //<computer name>/auctionsiteletbizdesk, and then press ENTER.

  3. In the Browse for Folder dialog box, accept the default settings, and then click OK.

  4. In Internet Explorer, click Start Business Desk.

    The Auction sitelet Business Desk opens.

  5. Click the Auction module, and then click Auction Manager.

  6. In the Auction Events screen, click Ee785014.add(en-US,CS.20).gif on the toolbar.

  7. In the New Auction Item screen, enter the product information for the item up for bid. For exemplary purposes, the Auction Sitelet sets the Auction Type to winning bid. For more information about the product properties, see the UpdateItem method for the Auction object in Commerce Server Help.

  8. In the New Auction Item screen, click The Save Auction icon. on the toolbar to save the auction item, and then click The Back icon. on the toolbar to return to the Auction Events screen.

    The auction item now appears in the Filtered View list.

To bid on an auction item

  1. Click Start, point to Programs, and then click Internet Explorer.

  2. In Internet Explorer, in the Address box, type //<computer name>/auctionsitelet, and then press ENTER.

    The Auction sitelet appears.

  3. Follow the onscreen directions to place a bid.

To view bid history in Business Desk

  1. Open the Auction sitelet in Business Desk from either the Start menu or the Desktop.
  2. In the Auction module, click Bids Manager.

All bids for all items appear in the Filtered View list.

Copyright © 2005 Microsoft Corporation.
All rights reserved.