Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The TWebServices works as a full application server. It manages data exchange, file access, and user authentication in a single process. Communication with the client is through websockets, allowing for bidirectional and real-time communication.

This page presents information about TWebServices, the built-in Web Services tool included in the product installation. 


On this page:

Table of Contents
maxLevel3
stylenone


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 project, The TWebService also enables execution of other Web Services, including the Solution Server service necessary to allow remote users to configure Projects located in the server.

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

Info
titleTWebServer 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

Info
titleAbout Linux

TWebService 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 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.
Code Block
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
Code Block
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’sinstallation folder, right click on top of the TWebService, and select ”Sendtodesktopasa 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:
Code Block
"C:\Program Files (x86)\...\<ProductName>\TWebService.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

Code Block
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:

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


Install it again, using the Administrator command line below:

Code Block
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.

Code Block
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:

Page Tree
root@parent
spacesV10