IBuySpy Store, Part I: Installing: Installation - Doc JavaScript | WebReference

IBuySpy Store, Part I: Installing: Installation - Doc JavaScript

IBuySpy Store, Part I: Installing

Installing the Web Site and the Database

When you download IBuySpy Store from http://www.asp.net, the store will be automatically installed on your IIS server. There are two problems with this kind of download. First, the JScript .NET version is not readily available in the above site, only VB and C#. Secondly, the automatic installation does hide some details that will make it harder for you to install your own applications. Follow the instructions here to install our own JScript .NET version of IBuySpy Store.

First, you need to download the IBuySpy Store. What you are downloading is a zipped version of the store. Extract all files to your C:\ drive. Since we kept the original file paths, you should get the regular directory structure under C:\. The root directory is C:\StoreDOCJS. Underneath, you have another StoreDOCJS directory. This should be the root directory of the Web site.

Now you need to install the new Web site at your IIS server. On Windows 2000, you go Start->Settings->Control Panel->Administrative Tools->Internet Services Manager. Expose the menu underneath the server entry. Default Web Sites should be one of the entries. Right-click it and select New->Virtual Directory. You should be presented with the Virtual Directory Creation Wizard. Click Next and choose the Alias for the store. You can pick any name. Let's assume you wrote StoreDOCJS. The next page will prompt you for the root directory of the Web site. Browse to the lower StoreDOCJS directory on your PC. This should be C:\StoreDOCJS\StoreDOCJS, if you have followed our instructions so far. Move on to the next page of the wizard. Don't touch any of the defaults and click Next to complete the wizard.

The next action you need to take is to install the sample store that comes with IBuySpy Store. The SQL script StoreDB.sql resides in the top level StoreDOCJS folder. The script will create a new database named StoreDOCJS, and will populate its tables with sample products, customers, and orders. To do this, invoke SQL Server Enterprise Manager, and choose Tools->SQL Query Analyzer. A new window will pop up. Load the SQL script by clicking on File->Open and browsing to the SQL script. If you follow our example above, the full path name should be C:\StoreDOCJS\StoreDB.sql. Once loaded, click on the Play button (right arrow) on the top menu bar. The StoreDOCJS database should be ready now.

Last but not least, you need to update the configuration file with the exact name of your MSSQL server. All configuration information is embedded in the file Web.config which is in the lower StoreDOCJS folder. One of the statements in this file is appSettings:

<add key="ConnectionString"
  database=StoreDOCJS" />

Replace the server name, HAW2L1800\NetSDK, with your own server name. You should be able to pick it easily from the SQL Server Enterprise Manager (the icon with the Play symbol next to it).

To start playing with the new database, surf to http://localhost/StoreDOCJS. The IBuySpy storefront should be loaded. The documentation is quite elaborate. Start reading.

Next: A Final Word

Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: September 23, 2002
Revised: September 23, 2002

URL: http://www.webreference.com/js/column119/6.html