Overview

This chapter presents information about TWebServer, the built-in Web Server tool included in the product installation. 

On this page:


TWebServer Overview

The Embedded Web Server, TWebServer, is automatically installed with the product.

The primary function of a web server is to store, process, and deliver web pages to clients. Communication between the client and server takes place using HTTP (or HTTPS). 

The TWebServer is simple solution, no configuration required, to enable the remote HTML5 and SmartClients displays when running your project, The TWebServer also enables execution of other Web Services, including the ProjectServer Service necessary to allow remote users to configure Projects located in the server.

The product installation tries to setup TWebServer on port 80 — or if fails, port 3100 — running as Windows Service. 

If the product Installation was successfulthere are no actions or any manual configuration required to do!

If both ports are already in use, the installation fails. In this case, you need to manually install TWebServer in another port, or use the Microsoft IIS Web Server instead. The IIS setup is described in Installing on Microsoft IIS.

This document describes how to identify if a Port is being used, and how to manually change or execute the TWebServer installation

TWebServer is not used on Linux installations, as the ProjectServer.exe provides remote access to projects and the TServer.exe that runs the application is also a file server for the HTML5 clients. 



Verifying which Ports are in use

To find the processes using web services at port 80, at the DOS prompt, you should run:

  • netstat -aon

This will display all the ports in use. Look after the 0.0:80 or 8080 string sequence on the Local Address column and get the PID (process identification).

  • tasklist

This will display all the process names and their identifications, so you can find which one is using the port 80.

If the application using Port 80/8080 is an application you can stop it and use the standard Product installation; otherwise you should install the Web services in another port.



Installing using a custom Port

This procedure describes how to install TWebServer.exe to run in use mode, not as a Windows Service.

To run the TWebServer in another port, you need to do the following steps:

  • Uninstall the current TWebServer from port 80, at the Administrator command prompt.
C:\Program Files (x86)\...\<ProductName>, execute: InstallTWebServer /uninstall /port:80
  • Install the service on the target port. For instance, 1234, using an Administrator command prompt
InstallTWebServer /port:1234

This uninstall and install setup procedures is executed only once. But, as we are not user Servicesthe call to TWebServer.exe needs to be added to added Windows Startup folder with the new port.  

In order to update the port number on TWebServer.exe shortcut at the Windows Startup folder, use the following steps:

  • On the Windows startup, modify the TWebServer.exe shortcut by adding the parameter: /port:1234.
  • To create a shortcut for the TWebServer using custom ports, you can go to the Product’s installation folder, right click on top of the TWebServer, and select ”Send to desktop as a shortcut”, or you can search for the shortcut in the Windows Startup folder. Then, you should right click the shortcut to edit its properties and change the ”Target” to:
"C:\Program Files (x86)\...\<ProductName>\TWebServer.exe" /port:1234

If you the port number is longer than the default ones, 80 or 3100, you need to start using the new port number on client connection to that server. See the examples using new port number 1234

http://127.0.0.1:1234/fs-8.1/TSmartClient.application
http://127.0.0.1:1234/fs-8.1/html5/index.html




TWebserver as a Windows Service 

This procedure describes how to install TWebServer as a Windows Service using a custom Port. 

Stop the execution of the TWebServer.exe, if that process is running. 

Uninstall the current TWebServer. At the Administrator command prompt execute:

cd <Product Installation folder>
InstallTWebServer /uninstall /port:<portNumber>


Install it again, using the Administrator command line below:

cd <Product Installation folder>
InstallTWebServer /windowsservice /port:<portNumber>


The service can be configured for a specific user account by accessing the TWebServer service properties and setting the LogOn property to the desired account.

The uninstall and install procedures are executed only once. The call to TWebServer
/port:1234 should be executed every time you login the computer

The new port should be specified in the client URL configuration. 
E.g.:
http://127.0.0.1:1234/fs-8.1/TSmartClient.application -- For Port Number 1234 
http://127.0.0.1:1234/fs-8.1/html5/index.html



Define the Service Log On

This procure will update the Service Log On using a network account

  • Open Windows Services and right-click FactoryStudioTWebServer Service to stop it.


Right-click FactoryStudioTWebServer Service, then Stop.


  • Once the service is stopped, open the Service Properties by right-clicking and selecting Properties.


Right-click FactoryStudioTWebServer Service, then select Properties


  • Click on Log On tab and enter the network account details the FactoryStudio service should use to run the application.


Fill in the fields needed and click OK to finish.


  • Click on OK and attempt to start the service.


Right-click FactoryStudioTWebServer Service, then select Start.


  • Check if the service was successfully started and its status is “Running”.



Check if TWebServer is running

1. Open Windows Services and verify that the “FactoryStudioTWebServer Service“ was successfully created.

2. Right-click the service and attempt to start it.

3. Check if the service could be started successfully and its status is Running.



Using HTTPS with TWebServer

TWebServer accepts HTTPS/SSL connection with self-certificate, verify the following requirements before enabling that feature.

  1. It is necessary to install a certificate that must be created by customer. This certificate has the same characteristics as other certificates that are installed in IIS.

  2. Self certificates are accepted, but Web Browsers will warn that these certificates are invalid. It is strongly recommended to use from a certificate provider such as VeriSign.

  3. If anyone has any computer with a real certificate, it would be good to test for validation and finish the implementation.

Steps to enable:

  1. Call "TInstallTWebServer" with parameter "/uninstall" with the port number (optional, defaults are 80 and 3100).

  2. Install your certificate.

  3. Change settings of TWebServer.exe.config file. Find  "HTTPS/SSL" sections, uncomment them and configure the required entries.

  4. Call again "TInstallTWebServer" with the port number (optional, defaults are 80 and 3100) to register new settings.


In this section...