Using the XBikes .NET sample code on a single computer requires the following software to be installed:
Windows Server 2003 or Windows 2000 Server with Service Pack 3 or later in Workgroup mode
.NET Framework 1.1 (Windows 2000 only; included in Windows 2003)
.NET Framework 1.1 SDK or Visual Studio 2003
Internet Information Services — World Wide Web Server
ASP.NET Application Server component (Windows 2003 only)
Microsoft Enterprise Instrumentation Framework (EIF)
Microsoft Message Queuing (also known as MSMQ)
Microsoft SQL Server 2000 with mixed mode security and Service Pack 3
JNBridgePro version 1.4 Enterprise Edition (run time only)
ASP.NET Session State Service should be running and its startup type should be set to automatic.
To install the XBikes application for the .NET platform on a single computer, complete the following steps.
To install XBikes for the .NET platform
Open Windows Explorer, and then double-click xbikes3tier.msi.
On the xbikes3tier wizard page, click Next.
On the Select Installation Folder page, make sure C:\Xbikes is the installation path, select the Everyone option to install XBikes for all users on the computer, and then click Next.
On the Confirm Installation page, click Next.
On the Install Options page, make sure Single Tier is selected, and then click Next.
In the Winzip Self Extractor dialog box, make sure Unzip to folder is set to C:\xbikes, and then click Unzip.
The dialog box shows that files were unzipped successfully, click OK.
In the Winzip Self-Extractor dialog box, click Close.
The installation program continues the setup process for a few seconds.
On the Installation Complete page, click Close.
The XBikes application is now installed. Before you execute the application, you will need to modify the identity of the COM+ to Network Service to allow the application to execute without the need for someone to be logged in.
To configure the COM+ Application
In Control Panel, double-click Administrative Tools, and then double-click Component Services. The Component Services Manager loads.
In the tree on the left, expand Component Services, expand Computers, and then expand My Computer.
Expand COM+ Applications. A list of installed COM+ applications is shown in the tree view.
Right-click XBikes, and then click Properties. The XBikes Properties dialog box appears.
Click the Identity tab, and then click the Network Service option.
Click OK. The XBikes Properties dialog box closes.
Close Component Services Manager.
Now you have the COM+ Application configured, the next task is to check the database connection string is correct for your system.
To configure the database connection string
In Notepad, open the Dllhost.exe.config file from the C:\Windows\System32 folder.
Find the start tag of the <SqlServer> element.
Check to make sure the connection string includes the correct server name. The server name is shown in bold below to help you.
<SqlServer> <connection> <add key="connectionString" value="server=localhost;database=xbikes;user id=dhb; password=bikes" /> </connection> </SqlServer>
If you need to change the connection string, modify the value attribute appropriately.
Locate the <QueueNames> tag. Change the NET-MSMQ value to include the correct IP address of your computer.
<Queue> <QueueNames> <add key="NET-MSMQ" value="FormatName:DIRECT=TCP:192.168.0.5\Private$\XBikes-OrderQueue" />
Using Notepad, open XBikes-DAL-MSMQServiceInterface.exe.config from the C:\Xbikes\Net\Xbikes-Dal-Msmqserviceinterface\Bin\Debug folder.
Repeat steps 2 through 4, and then save the file.
This completes the configuration of the XBikes Web application.
To test the installation and execute XBikes complete the following steps.
To execute XBikes
Load Internet Explorer.
In the Address field, enter the URL http://localhost/XBikes-Web.
The XBikes Web application allows you to browse bikes by type, order bikes, change quantities and check out your order.
When orders are written, they go to the message queue. To move orders from the .NET Message Queue into the SQL Server database, you must run a DOS console application. Complete the following steps on the .NET computer.
To run the DOS console application
Open a command prompt.
Type cd /D C:\xbikes\net\xbikes-dal-msmqserviceinterface\bin\Debug, and then press ENTER.
Execute XBikes-DAL-MSMQServiceInterface.exe. One message is read from the queue. The XML representation of the Order is displayed.
If there are more messages on the queue press Y; otherwise press any other key to exit the application.