PSIGEN Affinity API & Server Deployment Instructions

Overview

The PSIGEN Affinity API and Server work together to allow a variety of PSIGEN products, as well as custom applications, to communicate with your PSIsafe 32-bit installation via the Azure API Management Service. This not only allows 64-bit applications to work with your PSIsafe installation, but also allows programmers to create custom programs that can send and receive data as it suits your unique business application needs. Below is a breakdown of the PSIGEN Affinity API and Server deployment process.

 

Prerequisites:

  • Internet Information Services and IIS Manager. Required to host Affinity API in IIS on your server. See detailed requirements for specific Server Roles required below (referred to as Windows Features in Windows 10).

WEB SERVER IIS (Server Roles):

Common HTTP Features:

  • Default Document
  • Static Content

Health and Diagnostics:

  • HTTP Logging
  • Request Monitor

Performance Features:

  • Static Content Compression

Security:

  • Request Filtering
  • Windows Authentication

Application Development:

  • .NET Extensibility 4.7
  • ASP.NET  4.7
  • ISAPI Extensions
  • ISAPI Filters

Management Tools:

  • IIS 6 Management Console

  • Management Service

  • PSIsafe 32-Bit Server version 12.1.2.1007 or later

  • PSIsafe Desktop Client and Manager version 12.1.2.1007 or later
    Note: The Affinity API and Server runs independently of the PSIsafe Desktop Client and 32-Bit Server. However they are required when setting up a PSIsafe database and to run PSIsafe Management for registration and management.

  • ASP.Net  Core 3.1.6 or later Hosting Bundle: "https://dotnet.microsoft.com/download/dotnet-core/3.1 "


Items.png

Note: If you are developing an application utilizing the Affinity API you need to install the .Net Core 3.1.6 or later framework.

Important: Make sure that you install IIS BEFORE the Hosting Bundle. If not you will get a 500.19 Internal Server error when you try to run the API web site. To fix this perform a repair (re-install) of the Hosting Bundle.

 

Deployment Packages

If you are NOT a member of the PSIGEN Engineering team please use deployment package provided by PSIGEN. If you need assistance downloading a deployment package, Contact PSIGEN Support.

If you are a member of the PSIGEN Engineering team, you can get the latest build of Affinity API/Affinity Server from Azure DevOps "https://dev.azure.com/psigensoftware/PSIsafe Affinity API/_build"
In Azure DevOps drill down to the build you want to download and then select the Artifacts as seen in screen shot below and download API and Server.

 

trig.png

 

Make sure you Unblock downloaded ZIP files if blocked. Check Unblock and then press Apply:


unblock.png

 

Affinity Server/Service Deployment

  1. Create folder C:\Program Files\PSIsafe\AffinityServer.

  2. Extract the contents of server.zip.

  3. Move the contents of server/server to the folder C:\Program Files\PSIsafe\AffinityServer.

  4. If you have registered PSIsafe. Copy CNGDBList.XML from C:\Program Files (x86)\CNG\CNGServer to C:\Program Files\PSIsafe\AffinityServer.

  5. Open an administrative command prompt and run install.bat located in C:\Program Files\PSIsafe\AffinityServer\scripts.

  6. Open up Windows Services and ensure that you see an entry for "PSIGEN Affinity Server"

     

    services.png
  7. Make sure the service is running and that Startup Type is set to Automatic.

Note: If you need to remove a service you can:

  1. Use Powershell 7 or later with the command below:
    Remove-Service -Name "PSIGEN.Affinity.Service"
  2. If you have Powershell V5:
    * Open Windows PowerShell ISE
    * Paste the following two lines:
    * $service = Get-WmiObject -Class Win32_Service -Filter "Name='PSIGEN.Affinity.Service'"
    * $service.delete()
    * Run the script with F5 or pressing the play button
    
  3. Use command prompt (with Administrator privileges) with the command below:
    sc delete "PSIGEN.Affinity.Service"

 

Affinity API Deployment

  1. Extract the contents of api.zip to a folder path such as C:\Program Files\PSIsafe\AffinityAPI
  2. Open IIS (Internet Information Services)
  3. Right click Application Pools and Add a new App pool. Suggested name "AffinityAPI"
  4. Create a web site or an application below the Default Web Site.
    1. Administrators may wish to name the site AffinityAPI.
    2. The Website files are from step one [1] (example C:\Program Files\PSIsafe\AffinityAPI)
  5. Assign the Application Pool to the web site/application.

Important: Make sure the Affinity API Web Site is utilizing an HTTPS type binding. Additionally, if the Administrator does not have access to an SSL Certificate, one may need to be purchased.

 

Test that your API deployment is functional

1: In IIS Manager. Right select your AffinityAPI Web Site (Production) or AffinityAPI Application under Default Web Site.
2: Select Browse on the right side in IIS Manager:

iis1.png

3: Append /API to the URL in the browser
For example https://localhost:443/api  (with certificate) or http://localhost/affinityapi/api  (without certificate).
4: Verify that you see something similar to the following

check1.png

5. Test that the API can connect to your PSIsafe Database by appending the following to the URL: /databases?customercode=default
This should display a screen similar to the following (a list of PSIsafe databases visible to the Affinity API):

check2.png

If this step fails. Double check that you performed the step above:
Copy CNGDBList.XML from C:\Program Files (x86)\CNG\CNGServer to C:\Program Files\PSIsafe\AffinityServer


Add Write Permissions to applogs folder in API

This is required so that Affinity App Pool can write to the logs.

In IIS Manager:
1: Find the applog folder for the Affinity API.
2: Right click and select Edit Permissions

iis2.png

3: Open Security Tab.
4: Select Edit.
5: Click Add..
6: Key in "iis apppool\affinityapi" (where affinityapi is the name of the app pool used for Affinity API.)
7: Click Check Names. And then OK.

users.png

security.png

Test that API and Affinity Server are deployed and configured properly

To test do the following in IIS Manager:
1: Select your AffinityAPI Web Site (or application under Default Web Site).
2: Select Browse in the Actions Panel in IIS Manager.
Note: Your configuration may be different based on where you deployed the Affinity API and if you have a certificate configured.

iis3.png

3: Add /API to the URL in the web browser. For example:
This should display he following in the browser:

check3.png

4: Append the following to the URL: /databases?customercode=default
This will connect to the PSIsafe SQL DB and return one or more database names (as configured in PSIsafe Management)

check4.png

Congratulations! You have now successfully deployed the Affinity Server and API.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.