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:
Launch a TN3270E session connecting to Library of Congress.
Wait for main screen to be displayed.
1<ENTER>.
Wait for next screen.
6<ENTER>
Wait for next screen.
1<ENTER>.
Wait for next screen.
Send form data from client, followed by <ENTER>.
Continue navigating screens if more matches for the criteria or reaching 10 screens by sending <ENTER> key.
Screen scraping of the listing while navigating host screens.
Disconnect and close the session.
Send back the findings in HTML table format.
This C# .NET sample program requires the following in order to run:
Windows Server with .NET Framework and ASP.NET installed
IIS Server installed, configured and running properly
Access to the Library
of Congress TN3270 application using TCP Port 23. (You must have access
to the Internet to access this mainframe system). If,
for some reason, a connection cannot be made to this host, the LOCIS.ZCC
file may be edited to connect to a different host. Changes will need to be made to the source and
the application will need to be recompiled.
Here are the steps to follow:
Install the latest version of the .NET Framework on your server.
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.
When the installation is done, enable ASP.NET from the IIS manager under Web Service Extensions.
Create a folder called WAHIO under your default web site home directory (i.e. c:\inetpub\wwwroot).
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.
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.
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.
Open a browser window.
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.