Configuring the Web Service Files (.NET Core)
The Web Service .ini File
A Provided Web Service uses a configuration file called <Web Service>.ini, located in the SoapProvider directory of the application (..\Common\SoapProvider). This file contains information on how to connect the application server, either through directly connecting the application server (USEAPPMANAGER=False), or by first connecting to an application manager (USEAPPMANAGER=True). This file also contains Provided Web Service connection settings.
In the table below, all settings are described and have their default values displayed in bold.
Setting | Value | Description |
ADDRESS | <Server or Manager address> | The address of the application server or manager (either the name or the IP address of the server or manager. A spare can also be used). The value can also be found in the App.ini file or in the AMT Control Center. |
PORT | <Server or Manager port> | The port of the application server or manager (a spare server or manager can also be used). |
SPAREADDRESS | <Spare Server or Manager address> | The address of the spare application server or manager (either the name or the IP address of the server). |
SPAREPORT | <Spare Server or Manager port> | The port of the spare application server or manager. |
TIMEOUT | 60 | The time in seconds for the service to wait for a response before it times out. |
APPMANAGER | TRUE | FALSE | If set to TRUE, the service will make use of the application's AppManager. |
CONNECTIONTIMEOUT | 180 | The time in seconds for an idle connection to be disconnected. |
CONCURRENTCALLS | 100 | The number of maximum concurrent connections to the Web Service. |
SECUREFORMACCESS | TRUE | FALSE | If set to TRUE, the Forms security of the user or role in the Control Center will be used. |
STORESESSIONDATA | TRUE | FALSE | If set to TRUE, session data will be stored in the database to make use of retained variables in a provided Web Service. |
A line can be commented out by putting an asterisk (*) before a setting. For example: |
The appsettings.json File
The appsettings.json file is automatically created by the AMT generator in the same directory as the Web Service .ini file.
The AmtSoapHost will crash if the appsettings.json file contains an enabled entry with a HTTPS binding (Transport) without a valid Certificate bound to the HTTPS port. |
Follow the steps below to configure the appsettings.json file:
- Find the section ServiceMetadataBehaviorConfig and set the HttpsGetEnabled (or
HttpGetEnabled if a secure connection is not required) option to true.
It is possible to set the SecurityMode setting individually for each Web Service to "None" for HTTP and "Transport" for HTTPS, or use both simultaneously.
Optionally also set the option IncludeExceptionDetailsInFaults to true to have error messages sent to the Consumable Web Service. This needs to be set individually for each Web Service.
- Recycle the Application Pool associated with the Web Service in the IIS Manager.
- Browse to the URL of the Web Service to test if it has been configured correctly.
http://<Server>/<IIS Application>/<Web Service>.svc
This image shows that browsing to the URL of the Web Service was successful.
This page reveals the two available WSDL contracts:
http://<Server>/<IIS Application>/<Web Service>.svc?wsdl http://<Server>/<IIS Application>/<Web Service>.svc?singleWsdl
- It is now possible to import the Web Service's WSDL contract into LION Consumable Web Services.
Only the singleWSDL option is supported when importing into a LION Consumable Web Service.