Skip to main content

Form Module API - Installation Guide

Installation

Prerequisite: The Form Module API artifacts are downloaded for deployment.

artifacts

note

It must be installed on its own AppPool in IIS from all other ASP.NET Core components for everything to function correctly.

caution

This Form Module API should be deployed exclusively on the same IIS server as other EWA modules, functioning as a local/internal service, and it should never be exposed as a public service on the internet.

Using Web Deploy is the recommended way to both install and upgrade this component. Either set all the values in Bliksund.FormModule.WebAPI.SetParameters.xml or reuse the file when doing an upgrade.

  1. Edit the file Bliksund.FormModule.WebAPI.SetParameters.xml with suitable values in your system or copy the values from the file used in the last build. The initial of SetParameters.xml should look like this:
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<setParameter name="IIS Web Application Name" value="Default Web Site" />
<setParameter name="FormModuleDatabaseConnectionString" value="Data Source={Database Server};Initial Catalog={Database Name};User ID={Database Administrator};Password={Database Administrator Password};Pooling=False;MultipleActiveResultSets=True;Application Name=EntityFramework" />
<setParameter name="FormModule Api Key" value="{ApiKey}" />
</parameters>
info

You need to generate a new "FormModule API Key" in GUID format and then update it in Bliksund.FormModule.WebAPI.SetParameters.xml.

  1. Run the command Bliksund.FormModule.WebAPI.deploy.cmd /T to see what changes will be applied to the file system. Please note this command should be run under administration permission.

  2. Then run the command Bliksund.FormModule.WebAPI.deploy.cmd /Y to do the actual changes. You will see the change applied under the website on IIS. deploy

  3. If the command ran successfully, you can navigate to the /ping to test whether the new API is working (you may need to run the Bliksund.FormModule.WebAPI.exe if it does not work). ping

Appsettings

The appsettings.json and appsettings.xml files contain configuration values for the web API.

The values of appsettings.xml will be updated after executing the command Bliksund.FormModule.WebAPI.deploy.cmd /Y

The application will load settings from both files, but the load order is first the JSON file, then the XML file.

This means that settings in the XML file will override settings in the JSON file.

Here is the list of valid properties that we actively use in the Form Module API:

ElementDescriptionDefault Value
ConnectionStrings.FormModuleDatabaseConnectionThe connection string to the database. It might be the same database as your application or a separate one.Data Source={Database Server};Initial Catalog={Database};User ID={User};Password={Password};Pooling=False;MultipleActiveResultSets=True;Application Name=EntityFramework
ApiKeyThe new API key in GUID format need to be generated and put in the setting files.{ApiKey} placeholder