Installation of Standard API
Prerequisite
- Firewall rule that must be enabled: Windows Communication Foundation Net.TCP Listener Adapter (TCP-In).
- Ports that must be opened: HTTP(80), TCP (808).
- Domain user accounts must be configured:
- You need to have a created user in the Platina on whose behalf the request will be executed.
- Also you need to have a configured user that you specify in the Platina settings as StandardServiceAuthorizedUser.
- Ensure that IIS, ASP.NET, WCF, and the WCF activation component are correctly installed and registered.
- The MsDeploy tool must be installed.
Install Web app
- Unzip installation package to chosen location.
- Navigate to Install API\Install Service folder.
- (optional) The default installation location in IIS is to Default Web Site/GeneralWWW, if the user want to change this location open Platina.Integration.General.SetParameters.xml and change the value of IIS Web Application Name. Then save and close Platina.Integration.General.SetParameters.xml.
- For document handling to work, make sure the application pool account has access to platina document archive.
- Run the batch script runGeneralMsDeploy.bat.
- Add net.tcp in IIS. Open IIS and first click the Default Web Site -> Bindings. If the net.tcp is not in this list click add and add the net.tcp to the binding.
- Then navigate to GeneralWWW (or the name chosen) and click Advanced Settings, under Behavior in Enable Protocols after http add net.tcp (not that you can´t have a space between http and net.tcp. Click ok then close the window.
Install SQL
- Install SQL stored procedures and tables. Navigate to Install SQL folder and run the Sqlinstall.bat script.
- The user will be prompt with 3 values to input.
- Database server name – the server to install the stored procedures on ex "localhost"
- User – Database user
- Password – Database user password
- The script will generate an .txt file sp.log where you can look to see if everything went well.
- When installing the stored procedures and tables it will add two lines to tPlatinaSettings StandardAPI_ServiceWriting_Prefix (default value TjänsteskrivelseMITme) – the name that ServiceWriting created with the API. StandardServiceAuthorizedUser (no default value) – this represent the user communicating with platina, this must be a user in platina tUserSettings (ex WIN-HJLHHVOAG03\Administrator). This must be set by the user installing the API.
Completing the installation
- To check if the service is working navigate to the installed service -> Content View -> PlatinaService.svc -> Browse.
- If it is working you will get a window like this.
Errors and their solution
Error: net.tcp is not added.
Solution: go to section install web app and follow it's again starting from point 'Add net.tcp in IIS'.
Error: An item with the same key has already been added.
Solution: go to section install web app and repeat last last step.
Error: FaultException: Unauthorized service user.
Solution: StandardServiceAuthorizedUser is empty or another invalid value. Set the correct value and flush or stop the Redis cache.
Error: Setting StandardServiceAuthorizedUser not found
Solution: The setting doesn't exist in tPlatinaSettings. Add it and flush or stop the Redis cache.
Error: Login for "sa" failed
Solution: Replace eSqlHelper.dll in the bin folder for the API (GeneralWWW/bin) with the corresponding file from the Platina installation (PlatinaWWW/bin).
Error : The system was unable to find the specified registry key or value. msdeploy.exe is not found on this machine.
Solution: In case MsDeploy is not installed on the machine then it will be needed to install it. (How to install MsDeploy look at https://docs.microsoft.com/en-us/iis/publish/using-web-deploy/use-the-web-deployment-tool) if there is an error when installing it will be shown in the script window.
Error : Problem with cache
Solution: First of all, flush (or stop) the Redis cache after each database change you make (e.g. editing tPlatinaSettings). This only applies if the API is running on the same server as Platina. Do this in Platina under Administration > System Settings > Cache or by stopping or restarting the Redis service (Services > Redis) running on the web server.