Sales Creatio, commerce edition
PDF
This documentation is valid for Creatio version 7.15.0. We recommend using the newest version of Creatio documentation.

Websockets setup

The websocket protocol (WebSockets) is used in Creatio to run custom processes, notifications, and for integration with telephony. It is important to enable the websockets and configure the applications on the server for all system functions to operate correctly.

Attention

If you use proxy server in your local network, you will need to set up the websocket protocol. You can find the setup instruction in proxy server documentation.

This article describes the process of setting up Creatio configuration files for the correct operation of websockets.

Note

Installation of the components providing WebSockets protocol operation on the server is covered in a separate article.

Configuration can be performed in two ways:

  • Windows Server 2012, Windows Server 2016 or Windows 8/10 with the installed Internet Information Services (IIS) version 8 or higher is deployed on the application server. Configuration files are set up in Creatio base version by default and you only need to perform settings on the server side. However, if you deploy and set up Creatio for the first time, we recommend checking configuration file settings to make sure the websockets work correctly. Read more >>> 

To use the protected HTTPS connection, you need to perform additional settings. Read more >>> 

  • If Creatio is deployed on Windows Server 2008 or older, you need to perform additional configuration of components which support port, IIS and WebSockets protocol operation. Read more >>> 

When deploying Creatio on Windows Server 2008 or older, you cannot use the advantages of HTTPS.

Contents

Checking websocket settings for Windows Server 2012 or Windows server 2016

Configuring websockets for Windows Server 2008

Checking port availability

Websocket setup FAQ

Checking websocket settings for Windows Server 2012 or Windows server 2016

To check websocket settings in Creatio deployed on a server running on Windows Server 2012 or Windows Server 2016:

1.Make sure that inheritance is disabled in the Web.config file located at Creatio root directory. The query length limits and execution time should also be specified.

<location path="." inheritInChildApplications="false">
   <system.web>
     ...
      <httpRuntime maxRequestLength="73400" executionTimeout="28800" targetFramework="4.7" />

2.In the Web.config file located at the [Path to Creatio root folder]\Terrasoft.WebApp\: check that the “Terrasoft.Messaging.MicrosoftWSService.MicrosoftWSService, Terrasoft.Messaging.MicrosoftWSService” default value is specified for the wsService type and make sure that the port for connecting clients, the HTTP query execution time and length limits, as well as calling of additional modules are indicated.

Attention

We recommend using the “MicrosoftWSService” (instead of the “SuperWSService”) value for Microsoft Windows Server 2012.

Note

The portForClientConnection=”0” value means using the web-application port.

<wsService type="Terrasoft.Messaging.MicrosoftWSService.MicrosoftWSService,
Terrasoft.Messaging.MicrosoftWSService" encrypted="false" portForClientConnection="0" />
...
<location path="." inheritInChildApplications="false">
   <system.web>
    ...
     <httpRuntime maxRequestLength="102400" executionTimeout="28800"
targetFramework="4.6.2" />
      <httpHandlers>
       ...
        <add verb="GET" path="*ViewModule.aspx.ashx" type="Terrasoft.Messaging.MicrosoftWSService.WSHandler,
Terrasoft.Messaging.MicrosoftWSService" />
...
<system.webServer>
   ...
   <handlers>
     ...
     <add name="WSHandler" verb="*" path="*ViewModule.aspx.ashx"
type="Terrasoft.Messaging.MicrosoftWSService.WSHandler, Terrasoft.Messaging.MicrosoftWSService" />

Note

You can check the WebSockets connection via browser built-in Developer Tools. If the connection is successful, the console will contain a record like: WebSocket-connection opened for url:ws://demo.creatio.com/0/Nui/ViewModule.aspx.ashx

Configuring websockets for Windows Server 2008

To set up websockets in the application deployed on Windows Server 2008 or earlier, open the Web.config file located in the [Path to the root Creatio directory]\Terrasoft.WebApp\ directory. The wsService configuration block should look like:

<wsService type="Terrasoft.Messaging.SuperWSService.SuperWSService,
Terrasoft.Messaging.SuperWSService" defaultPort="2011" encrypted="false" portForClientConnection="44310"
maxConnectionNumber="100" clearIdleSession="false"
clearIdleSessionInterval="120" />

Note that the defaultPort value must be unique and should not coincide with other port values for all server applications.

If Creatio is deployed on Windows Server 2008, and Internet Explorer is used to work with the system, you need to provide access to cookie session from the JavaScript. To do this, change the httpOnlyCookies value in the Web.config file.


<httpCookies httpOnlyCookies="false" />

Checking port availability

To check port availability, enter the following into the Windows command line:

telnet –a [host [port]]

Specify the web address of the deployed Creatio application as host and the default value of the Web.config file as port. For example:

telnet -a demo.creatio.com 2011

Websocket setup FAQ

How can I check the correctness of websocket setup?

I configured websockets, but they do not work. Why?

How can I check the correctness of websocket setup?

There are several quick ways to check the correctness of websocket setup:

  • Use the Excel data import function. If websockets are configured correctly, the data import will be performed.

  • Enter the following command into the command line of web browser developer console: Terrasoft.ServerChannel.ping(). If websockets are configured correctly, the sever will return a pong response (Fig. 1). If any other response is returned, check the correctness of websocket setup.

Fig. 1 – Websocket setup verification via the developer console of a web browser

scr_chapter_websockets_check_working.png 

  • Manually run the business process containing the start timer and the auto-generated page elements. If the auto-generated page opens, the websockets are configured correctly.

Note

More information about business process elements is covered in a separate article.

I configured websockets, but they do not work. Why?

If websockets do not work after the setup, check:

  • Whether all the WebSockets protocol components are configured. Read more >>> 

  • Whether the used ports are available. Read more >>> 

  • Whether the protocol for using websockets with a proxy server is installed, if it is used for your local network.

  • Settings of antivirus and Firewall. If you cannot disable these programs on the server, add the IP-address and your Creatio site port to the list of exceptions for incoming and outgoing flows.

  • Available web browser extensions and add-ons, including VPN. Extensions may block websocket work.

See also

Switching from HTTP to HTTPS

Setting up additional parameters and integrations

Creatio setup FAQ

Did you find this information useful?

How can we improve it?