Building a Simple Thin client program

As we will see shortly, there is no one way to build a Thin client program. The following procedures allow you to develop a simple, unsecured Thin client program.

Procedure A: Thin Client using NTWebServer, Local Loopback

An easy way to initially develop and test a Thin client program is to use the light-weight Web server NTWebServer on your development PC, initiate the runtime project and use Microsoft Internet Explorer on the same PC to display the Web pages.

Step 1: Configure IWS Settings

  1. On the Project tab of the ribbon, in the Web group, click Thin Client.


    • In the Data Server IP Address field, enter 127.0.0.1
    • Check the Auto Screen Scaling, Enable File Compression, and Enable Tooltips checkboxes are checked
    • Click on the IP Security Button. Be sure then Enable checkbox is unchecked. Click OK.
    • Click on the Advanced Button. Be sure the Web Tunneling Gateway Enabled checkbox is unchecked. Click OK.


  2. Open the Execution Tasks dialog (Tasks on the Home tab of the ribbon) and be sure the TCP/IP Server task is set to Automatic.

Step 2: Configure Database

  1. In the Development Environment, select the Global tab of the Project Explorer. Open the Project Tags folder.
  2. Be sure the project tags are properly set to either Server or Local. If the tags are to be exposed to the Web Client, then set them to Server, otherwise set to Local.

Step 3: Develop your Screens and create HTML screens

  1. Develop your project screen. Depending on your Thin Client screen size, you may want to develop a separate set of screens with a different resolution. Auto Screen scaling is supported (enabled in a prior step), but auto screen scaling naturally has limitations.
  2. Save and close all project screens.
  3. Be sure you have defined a Startup Screen (Viewer on the Project tab of the ribbon).
  4. You can save individual screens as HTML by selecting the Save as HTML or Save Screen Group as HTML options in the Application menu, or save all Screens and Screen Groups as HTML by selecting the Save All as HTML option.
  5. If you are just updating a Screen, and especially when you make any configuration changes to the Web settings, you should run the Verify Project tool (i.e., on the Home tab of the ribbon, in the Tools group, click Verify).
  6. The HTML (web) pages will be stored in the Web sub-folder of your project folder.

Step 4: Install NTWebServer

  1. NTWebServer is InduSoft's lightweight Web Server for Windows NT/XP/2000/Server 2003/Vista environments. NTWebServer.exe is found in […]\InduSoft Web Studio v7.0\Bin
  2. Copy NTWebServer.exe from the \Bin folder and paste it into the Web sub-folder of your project folder.
  3. From the Web sub-folder, double click on NTWebServer to start it.
  4. A new window should pop-up. At the bottom, there should be a message indicating that NTWebServer is listening. If a message appears that NTWebServer failed to open a socket, it is most likely caused by Microsoft IIS (Web Server) running in a background mode. If this is the case, you will need to stop IIS, and then restart NTWebServer
    Tip: A Web server typically operates on, or "listens to," a computer's TCP/IP port 80. Only one running process can listen to a given port, so if another process on your computer — for example, some third-party SCADA software — is already listening to port 80, then it and the Web server process may conflict with each other. You must either configure one of the processes to listen to a different port or use Task Manager to end the conflicting process. If you cannot identify the conflicting process, then in Windows, open Command Prompt and enter the following command to get a list of all networking processes:
    netstat -a -o
    

Step 5: Start the runtime project

  1. On the Home tab of the ribbon, click Run.

Step 6: Launch Microsoft Internet Explorer and connect to the Web Server

  1. Click on the Start button (or Alt Tab) to access the Microsoft Internet Explorer program.
  2. Start Internet Explorer, and type the address of the starting (home webpage). E.g. http://127.0.0.1/startup.html
  3. Note that the startup.sg (or whatever your startup display or screen group name is) will have a HTML file extension on it when accessed from Internet Explorer.
  4. Sign on as Guest with no password, assuming no security has been enabled.

Procedure B: Thin Client using NTWebServer, Network IP

Once Procedure A has been completed, the next step is to enable network connected Thin Clients, instead of using the local loopback. You need to know the IP address of your PC, as seen from the network. You can get this information from the Network Settings in the Control Panel, or putting the function GetComputerIP() in a Rectangle Object on a screen and running the project.

Step 1: Configure IWS Settings

  1. Stop any active runtime project.
  2. On the Project tab of the ribbon, in the Web group, click Thin Client. In the Data Server IP Address field, enter the IP address of your PC (as viewed from the network). E.g. 192.168.1.100
  3. Run the Verify Project tool (Verify on the Home tab of the ribbon). This will set change the Data Server IP address in the web pages, so that the Thin Client will automatically exchange data with the correct Data Server.

Step 2: Start the runtime project

  1. On the Home tab of the ribbon, click Run.
  2. Be sure NTWebServer is still running.

Step 3: Launch Microsoft Internet Explorer and connect to the Web Server

  1. Click on the Start button (or Alt Tab) to access the Microsoft Internet Explorer program.
  2. Start Internet Explorer, and type the address of the starting (home webpage). E.g. http://192.168.1.100/startup.html
  3. Sign on as Guest with no password, assuming no security has been enabled.

Procedure C: Thin Client using IIS, Network IP

Once Procedure B has been completed, the next step is to enable IIS to become the Web Server for your Thin Clients instead of NTWebServer. The following are the basic steps to configuring IIS, although depending on your network and Operating System environment, additional settings may need to be configured such as user security.

Step 1: Configure IWS Settings

  1. Be sure NTWebServer is terminated.
  2. Click the Start button, then Control Panel > Administrative Tools.
  3. Select (click on) Internet Information Services.
  4. Expand the Web Sites tree structure to see the Default Web Site.


  5. Right click on the Default Web Site and select Properties to get the Default Web Site Properties dialog.


  6. Click on the Home Directory tab. Click on the Local Path Browse button and point to your project's Web subfolder.
  7. Click on the Web Site tab. Make sure the TCP port is set to 80. You can click the Advanced button to enable the IIS Web Server to respond to specific IP addresses and IP Port numbers.
  8. If your Web Server is behind a Proxy, be sure to check the HTTP Keep-Alives Enabled checkbox. It does not hurt anything if this is always checked.


  9. Click on the HTTP Headers tab. Click on the MIME Map File Types button to open the File Types dialog. Next, click on the New Type button to add a new MIME type. Put the file extension in the Associated Extension field. In the Content type (MIME) field, put MIME type followed by a / character, followed by the file extension name (application/studio). E.g.

    Associated Extension: .scc

    Content Type: application/studio



  10. Click on the Directory Security tab. From this tab, you can change the settings for Anonymous User Access and Authentication Control as well as Secure Communications (i.e., using SSL 3.0).
  11. Click on the Anonymous User Access and Authentication Control Edit button to get the Authentication Methods dialog. Normally, you do not have to do anything in this dialog but depending on the Security system your network administrator has installed, you may need to adjust settings in this dialog.
  12. The Secure Communications Server Certificate button opens a wizard that lets you define a Certificate for support of secure communications using SSL.


About MIMEs

Step 2: Start IIS and start the IWS Project

  1. Be sure NTWebServer is terminated.
  2. Click on the IIS Start button.
  3. Run the project.


Notes:
  • If IIS is not installed on your PC, you can add it (to Windows XP Pro/Windows 2000 or Windows Server 2003) by opening the Control Panel, then selecting Add/Remove Programs > Add/Remove Windows Components and checking the Internet Information Services (IIS) checkbox in the Windows Components Wizard. You can click on the Details button to select various components of IIS to install. Note that you may need to have your Windows installation disk.
  • You can get more information on IIS by opening a browser and entering http://localhost/iishelp in the browser navigation address bar. Note that IIS must be running.
  • NTWebServer is a Windows program, while IIS is a Windows service.
  • It is STRONGLY SUGGESTED that you use IIS instead of NTWebServer in a runtime mode. It is more reliable and higher performance than NTWebServer.
Troubleshooting:
  • If you get a Cannot find Server error message,
    • From the browser, ping the server IP address (primary and/or backup). You can ping using the IP address or use the NetBios name to ping the server (e.g., from a command prompt enter
    • Ping 152.57.100.25 or Ping ServerName.
    • Be sure IIS is running
    • Be sure your project is running
    • Make sure the TCP/IP Server (in the project's Tasks) is running
    • Be sure IIS is set to the correct Home Page (root directory).
    • Be sure the Port addresses are correct (HTTP – Port 80, HTTPS (SSL) – Port 443, Data – Port 1234)
    • Make sure you firewall has these ports open
    • If you are using a Windows Embedded device, be sure ISSymbol is properly loaded and registered
    • Be sure your runtime license supports the Web Client configuration
  • If you get a Page cannot be displayed error message,
    • From the browser, ping the server IP address
    • Stop and restart IIS
    • Be sure the MIME types are properly set
    • Make sure you updated your web pages (i.e., Save as HTML) and use the Verify Project tool if you change any Web settings.
    • Verify the Windows security settings are properly set
    • Be sure that the Screen name (and Web Page name) do not have any spaces in the name
  • If the web pages are incorrect:
    • Be sure you are pointing to the correct primary URL
    • Be sure your backup URL (if you use it) has the correct (updated) web pages