Skip to main content

i4connected Knowledge Base

Installing the i4connected API

Abstract

Check out this article and learn how to set up your i4connected API by going through the tutorials we have carefully prepared for you.

Setting up the i4connected API
Abstract

Check out this article and learn how to deploy the i4connected portal on your working machine, by mapping the portal folder to IIS.

The first step when installing the i4connected application API consists of mapping the portal folder to IIS and converting to the application, through a custom application pool, by following the below-described steps:

  1. Save the contents of the portal folder in the desired place on the hard drive. It is advisable not to use a very long folder path for storing the portal's files.

  2. Open the Internet Information Services (IIS) Manager and expand the Connections tree structure in order to reach the Application Pools node.

  3. Right-click on the node and select the Add Application Pool option.

    Add_App_Pool.jpg
  4. In the Add Application Pool dialog fill in the following settings:

    API_App_Pool.jpg
    1. Name - Name of the new i4connected Application Pool. For the current tutorial, we will use the "ii4connected_API" name.

    2. .NET CLR version - select the No Managed Code option.

    3. Managed pipeline mode - select the Integrated option.

  5. Click the OK button to save the new Application Pool.

  6. Select the new Application Pool in the list view via right-click. Select the Advanced Settings option.

  7. In the Advanced Settings dialog set the Load User Profile option to TRUE.

    Load_User_Profile.jpg

    Tip

    If you access the SQL Server on a different server, then you need to set the Identity to a User that has access to the Analysis Services of the SQL Server. In our case, it’s the previously mentioned" ServiceUser” account.

  8. Next, select the i4connected Website and select the Add Application option.

    Add_Application.jpg

    Tip

    API can be added as a separate application, not necessarily under the i4connected pool. However, in this case, the Site bindings should be properly updated.

  9. In the Add Application dialog configure the new application as follows:

    Add_API_App.jpg
    1. Alias - the alias of the IIS application (for example "API").

    2. Application pool - click the Select button and add the Application Pool you created at step 4.

    3. Physical path - use the Browse For Folder selector to apply the i4connected API folder.

    4. Next, click the OK button to save your changes.

Setting up i4Identity
Abstract

Check out these articles and learn how to set up the Single-Sign-On authentication scheme, via the i4Identity feature.

After setting up the i4connected WebApp and API, let's proceed with the i4Identity Application Pool and Site, as follows:

  1. Open the Internet Information Services (IIS) Manager and expand the Connections tree structure in order to reach the Application Pools node.

  2. Right-click on the node and select the Add Application Pool option.

    Add_App_Pool.jpg
  3. In the Add Application Pool dialog fill in the following settings:

    Add_identity_App_Pool.jpg
    1. Name - Name of the new i4connected Application Pool. For the current tutorial, we will use the "i4connected_Identity" name.

    2. .NET CLR version - select the No Managed Code option.

    3. Managed pipeline mode - select the Integrated option.

  4. Click the OK button to save the new Application Pool.

  5. Select the new Application Pool in the list view via right-click. Select the Advanced Settings option.

  6. In the Advanced Settings dialog set the Load User Profile option to TRUE.

    Load_User_Profile.jpg
  7. Next, select the i4connected Website and click the Add Application option.

    Add_Application.jpg
  8. In the Add Application dialog configure the new application as follows:

    Add_identity_Ap.jpg
    1. Alias - the alias of the IIS application (for example "Identity").

    2. Application pool - click the Select button and add the Application Pool you created at step 4.

    3. Physical path - use the Browse For Folder selector to apply the i4connected Identity folder.

    4. Next, click the OK button to save your changes.

Editing the API configuration files
Abstract

Check out this article and learn how to edit the i4connected API configuration files in just a few easy and fun steps.

After processing the changes at the level of the Internet Information Services (IIS) application, we need to edit the API configuration files to set up the correct endpoints, in order to communicate with the Analysis Services and the SQL Database, as follows:

  1. Open the i4connected API folder, identify the WEBfactory.DWH.Web.Core.exe.config file and open it using an editor tool.

    CoreFolder.jpg
  2. The WEBfactory.DWH.Web.Core.exe.config provides the Connection strings for the Analysis Service and SQL Database. Check if the connection strings are correct and if not, make the necessary updates.

    Core_exe_fle.jpg

    Tip

    Further on, if a proxy is needed to reach the internet you can add the following into the WEBfactory.DWH.Web.Core.exe.config file directly in front of the <runtime> definitions:

       <system.net>
            <defaultProxy
    enabled="true">
            <proxy
    bypassonlocal="true"
                proxyaddress="http://ip_oder_name:Port/" />
            </defaultProxy>       
        </system.net>
    
  3. Make sure to save your changes.

  4. Next, open the i4connected Identity folder, identify the appsettings.json file and open it using an editor tool.

    Identity_fiolder.jpg
  5. Check if the connection string is correct and if not, make the necessary changes so the connection String's Initial Catalog attribute points to the correct database.

    Identity_appsettings_json.jpg
  6. Make sure to save your changes.

  7. Last but not least, open the i4connected API folder, identify the appsettings.json file, and open it using an editor tool.

    API_appsettings_json.jpg
  8. Make sure that the Authority Uri points to the Identity site, using the same protocol (HTTP or HTTPS).

    Tip

    The Authority Uri should point to the i4Identity site. The Uri should not end with the "/" character.

    For example http://localhost/identity

    Authority_URL.jpg

    In case your i4connected portal should be accessible by any other external services, you must also define the PublicUri.

Tip

In order to enable the Import Service function, the RabbitMQ settings need to be configured under the "appsettings.json" file under the identity folder.

rabbitmq.jpg
  • Uri - amqp://localhost

  • ConfirmPublishTimeout - 30sec

Tip

If you desire to use your i4connected environment in association with the Swagger application, it is necessary to edit the redirect URL of the API in the database, as follows:

  1. Open the Database in the SSMS and go to the table ClientRedirectUris.

  2. Open the table in edit mode and change the row with the ClientId 3 to use the IP/name of the API.

    Tip

    For example http://192.168.0.xxx/api/docs/oauth2-redirect.html

Effective Permissions
Abstract

In order that the i4connected effective permissions to be applied to your i4connected portal please follow the RabbitMQ installation and configuration guidelines.

Important

The Effective permissions feature is only available for i4connected 5.6 version. If your application version is lower, these steps are not needed.

The i4connected 5.6 runs on a security model that enforces a new set of permissions, also known as Effective Permissions.

The settings for them, are stored under the Identity appsettings.json file and can be customized by the user, as follows:

  1. Open the i4connected Identity folder and locate the appsettings.json file.

  2. Open the appsettings.json file with an editor tool and proceed with the following settings, under the Effective Permissions section:

    Note

    In case no custom changes are needed, RabbitMQ Server will take the default values for Effective Permissions, which are:

    rabbitmq_server.jpg
    • Uri - amqp://localhost

    • ConfirmPublishTimeout - 30sec

    However, in case the RabbitMQ Server will be used for more than one i4connected installation, these settings need to be customized for each i4connected setup. In this case, we recommend the use of Virtual Hosts.

    For more details about the RabbitMQ Virtual Hosts, please visit the dedicated article, here.

    1. Uri - the Url pointing towards the RabbitMQ Server.

      Tip

      The Url will be formatted as follows: amqp://user:password@host:port/vh.

    2. EffectivePermissionsExchange - the name of the RabbitMQ Exchange.

      Important

      In case you are using your own RabbitMQ server, please provide the WEBfactory team with the name of your RabbitMQ Exchange.

      Please also make sure that yourRabbitMQ Exchange meets the following requirements:

      • Exchange Type - Direct

      • Exchange Durability - Durable

      • Exchange Auto delete - No

    3. ConfirmPublishTimeout - the custom timeout value for confirming the data publishing.

    4. ImportExchange - the name of the Importer Service Exchange, if the Importer tool should be enabled.

  3. Make sure that the respective lines are enabled (uncommented).

Note

RabbitMQ also requires some settings at the level of the i4connected Server. For more details please also visitthe dedicated article, here