Troubleshooting / Frequent problems

<< Click to display table of contents >>

Navigation:  »No topics above this level«

Troubleshooting / Frequent problems

Error 1: – Certificate error

Error message:

The error message below appears when calling up any function of the API.

"A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted."

Cause:

There is a trust issue between the TiCon REST APIREST-API and the database management system (DBMS).

With the default settings, the data exchange between SST and DBMS is encrypted with SSL and the server certificate of the DBMS is checked when the connection is established (checked means whether it is valid, issued to the correct server name, and has not yet expired as well as whether the certificate-issuing body belongs to a trustworthy body).

This setting is recommended from an IT security perspective and makes attacks more difficult.

The DBMS server certificate was issued by a certificate authority that is not trusted by the server on which the interface is running.

Solution:

The recommended solution is to adjust the certificate on the DBMS or adjust the trusted certificate authorities on the SST server.

Alternatively, the security level can be reduced. The next lower level would be to keep the encryption (Encrypt = True) and blindly trust the certificate of the DMBS (TrustServerCertificate = True).

To do this, the setting of the connection string must be adjusted in appsettings.json (e.g. under c:\inetpub\TiCon4RestAPI):

„TiCon4Database“: „Data Source=<mysource>; Initial Catalog=ticon410; User Id=ticonuser; Password=topsecret; Persist Security Info=True; MultipleActiveResultSets=True; Encrypt=True; TrustServerCertificate=False; App=TiCon4RestAPI;“,

You can achieve an even lower level of security by turning off encryption (Encrypt = False). In this case, it doesn't matter whether you blindly trust the server certificate or not, since no encryption is taking place at all. To do this, you must adjust the setting for Connection-Strings in appsettings.json (e.g. under c:\inetpub\TiCon4RestAPI):

„TiCon4Database“: „Data Source=<mysource>; Initial Catalog=ticon410; User Id=ticonuser; Password=topsecret; Persist Security Info=True; MultipleActiveResultSets=True; Encrypt=False; TrustServerCertificate=False; App=TiCon4RestAPI;“,

Error 2 - Parsing error in web.config

Error message:

When you access the documentation page, for example, https://localhost:443, an IIS error message appears stating that the Web.config file cannot be parsed.

Cause:

The Web.config contains configuration settings for ASP.NET. If ASP.NET is not installed, the file cannot be processed by the IIS.

Solution:

Install the current version of the ASP.NET Core Hosting Bundle for version 10. It's possible that step 3 was skipped during the IIS installation. To be on the safe side, this should be repeated once again.

Error 3 – JSON format exception

Cause:

In Windows event log:

-->System.FormatException: Could not parse the JSON file.

Cause:

The configuration file is not written correctly, e.g. quotation marks have been forgotten or backslashes (\) are not masked (= doubled).

Solution:

Visit the website: https://www.online-json.com/json-validator
and upload the JSON file here. Check where the Spelling error is and correct it (e.g. double Backslashes (\))

Error 4 – Database connection not possible

Error message:

When checking the interface version via "https://{{yourhost}}/ticon-web/services/management/version", an error message is displayed for dbVersion, e.g. "Error during login for the user MYDOMAIN\\MYSERVER1$.

Cause:

The user under whom the interface is running cannot log in to the database server for the database.

Solution:

There are three ways to fix the problem:

1.Authorize the user under whom the interface is running. To do this, the user from the error message must be added to the DBMS under "Security".
rest_api_15

2.Run the interface under a different user account. This can be configured in Internet Information Services (IIS) Manager under Application Pools.
rest_api_16

3.Do not establish the database connection via "Integrated Security"; use SQL authentication instead. This setting is configured in the appsettings.json as follows, for example:
"ConnectionStrings": {
 "TiCon4Database": "Data Source=myserver; Initial Catalog=ticon410; User Id=mydbuser; Password=mypassword; MultipleActiveResultSets=True; App=TiCon4RestAPI",
 "TiCon4DatabaseProvider": "Microsoft.Data.SqlClient"
},