You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

TWebServices and TServer are components within the software platform. TWebServices enables external interactions by providing a web interface and APIs, enabling remote system monitoring, control, and integration with other software. TServer is the backbone for internal processes, handling data exchange and communication between devices and software modules via WebSockets for real-time, bidirectional connectivity. It also manages system configuration and a shared real-time database, supporting the functionalities that TWebServices makes accessible externally, thus ensuring seamless operation and integration across the platform.

On this page:


Overview

The Embedded Web Server, TWebService, 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 TWebService is simple solution, no configuration required, to enable the remote HTML5 and SmartClients displays when running your solution. The TWebService also enables execution of other Web Services, including the Solution Server service necessary to allow remote users to configure Solutions located in the server.

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

TWebServer Installation

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 TWebService 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 TWebService installation

About Linux

TWebService is not used on Linux installations, as the SolutionServer.exe provides remote access to solution 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 TWebService.exe to run in use mode, not as a Windows Service.

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

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

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

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

  • On the Windows startup, modify the TWebService.exe shortcut by adding the parameter: /port:1234.
  • To create a shortcut for the TWebService using custom ports, you can go to the Product’s installation folder, right click on top of the TWebService, 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>\TWebService.exe" /port:1234

If you the port number is different 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

TWebService as a Windows Service

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

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

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

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


Install it again, using the Administrator command line below:

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


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

The uninstall and install procedures are executed only once. The call to TWebService /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 TWebService 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 software platform 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 TWebServices is running

1. Open Windows Services and verify that the “TWebServices-FrameworX Services“ 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 TWebServices

TWebServices 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 "TInstallTWebServices" with parameter "/uninstall" with the port number (optional, defaults are 80 and 3100).

  2. Install your certificate.

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

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


In this section:

The root page @parent could not be found in space v10.

  • No labels