Deploying XBikes on a Single Computer

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.

Installing the XBikes Application

To install the XBikes application for the .NET platform on a single computer, complete the following steps.

To install XBikes for the .NET platform

  1. Open Windows Explorer, and then double-click xbikes3tier.msi.

  2. On the xbikes3tier wizard page, click Next.

  3. 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.

  4. On the Confirm Installation page, click Next.

  5. On the Install Options page, make sure Single Tier is selected, and then click Next.

  6. In the Winzip Self Extractor dialog box, make sure Unzip to folder is set to C:\xbikes, and then click Unzip.

  7. The dialog box shows that files were unzipped successfully, click OK.

  8. In the Winzip Self-Extractor dialog box, click Close.

  9. The installation program continues the setup process for a few seconds.

  10. On the Installation Complete page, click Close.

Configuring the XBikes Web Application

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

  1. In Control Panel, double-click Administrative Tools, and then double-click Component Services. The Component Services Manager loads.

  2. In the tree on the left, expand Component Services, expand Computers, and then expand My Computer.

  3. Expand COM+ Applications. A list of installed COM+ applications is shown in the tree view.

  4. Right-click XBikes, and then click Properties. The XBikes Properties dialog box appears.

  5. Click the Identity tab, and then click the Network Service option.

  6. Click OK. The XBikes Properties dialog box closes.

  7. 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

  1. In Notepad, open the Dllhost.exe.config file from the C:\Windows\System32 folder.

  2. Find the start tag of the <SqlServer> element.

  3. 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> 

    1. If you need to change the connection string, modify the value attribute appropriately.

  4. 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:\Private$\XBikes-OrderQueue" /> 

  5. Save Dllhost.exe.config.

  6. Using Notepad, open XBikes-DAL-MSMQServiceInterface.exe.config from the C:\Xbikes\Net\Xbikes-Dal-Msmqserviceinterface\Bin\Debug folder.

  7. Repeat steps 2 through 4, and then save the file.

This completes the configuration of the XBikes Web application.

Running XBikes on a Single Tier

To test the installation and execute XBikes complete the following steps.

To execute XBikes

  1. Load Internet Explorer.

  2. 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

  1. Open a command prompt.

  2. Type cd /D C:\xbikes\net\xbikes-dal-msmqserviceinterface\bin\Debug, and then press ENTER.

  3. Execute XBikes-DAL-MSMQServiceInterface.exe. One message is read from the queue. The XML representation of the Order is displayed.

  4. If there are more messages on the queue press Y; otherwise press any other key to exit the application.

Application Interoperability. Microsoft. NET and J2EE
Application Interoperability: Microsoft .NET and J2EE: Microsoft(r) .Net and J2ee (Patterns & Practices)
ISBN: 073561847X
EAN: 2147483647
Year: 2003
Pages: 104 © 2008-2017.
If you may any questions please contact us: