Sample Program - C# .Net Server

This server based sample program demonstrates how to use PASSPORT Host Integration Objects in C# ASP.NET. This sample is a web application that connects to the Library Of Congress and allows you to search for copyright information. After the user types text to search for and clicks the "Submit" button, a host session is created at the server, then information is retrieved from the host and sent back to the client in an HTML table if information is found.

When the HTML form is submitted to the server, this ASP.NET application will take the following steps to search:

  1. Launch a TN3270E session connecting to Library of Congress.

  2. Wait for main screen to be displayed.

  3. 1<ENTER>.

  4. Wait for next screen.

  5. 6<ENTER>

  6. Wait for next screen.

  7. 1<ENTER>.

  8. Wait for next screen.

  9. Send form data from client, followed by <ENTER>.

  10. Continue navigating screens if more matches for the criteria or reaching 10 screens by sending <ENTER> key.

  11. Screen scraping of the listing while navigating host screens.

  12. Disconnect and close the session.

  13. Send back the findings in HTML table format.
     

Requirements

This C# .NET sample program requires the following in order to run:

How to Install Sample Application

Here are the steps to follow:

  1. Install the latest version of the .NET Framework on your server. Windows 2003 comes with the .NET Framework installed. For Windows 2002, this can be done from the Internet Explorer Windows Update.

  2. Install and enable ASP.NET.  At the command prompt window, type the command below to start the installation:

    “%systemroot%\Microsoft.net\framework\versionxxx\aspnet_regiis.exe” –i

    Where versionxxx represents the version number of the .NET Framework installed on your server. If you have multiple versions on your server, use this latest one.  

  3. When the installation is done, you can enable ASP.NET for Windows 2003 from the IIS manager under Web Services Extension. For Windows 2000, this step is not necessary.

  4. Create a folder called WAHIO under your default web site home directory (i.e. c:\inetpub\wwwroot).

  5. Copy all of the files and subfolders under the DotNetServers\CSServer\ sub folder located in C:\Program Files\PASSPORT Host Integration Objects\ or wherever you have PASSPORT HIO installed.

  6. Create WAHIO as an application from the IIS Manager. You can do this by editing the WAHIO Properties and select Create Application Name under Application Settings.
     

To run the Sample Program:

  1. Make sure the sample is installed and configured by following the instructions in the "Dot Net Sample.htm" file located in the C:\Program Files\PASSPORT Host Integration Objects\DotNetServers\CSServer\ folder.

  2. Open a browser window.

  3. Navigate to the following URL:

    http://servername/WAHIO/default.htm

After the program is opened, type some text to search for in the LOCIS database, then select the "Submit" button. If the text you searched for is found, a table should be returned with the results.

Note:
If the server you have this sample application installed on cannot access the internet, the sample application will fail. The LOCIS mainframe is the Library of Congress Information System mainframe system.