HomeGuidesRecipesAPI
HomeGuidesAPILog In

Configuring Extensions

Define application Settings

The previously mentioned providers have a new interface and structure in v10, implementing a new .NET standard to define specific app settings. Instead of using web.config, all your settings are now located in appsettings.json.

📘

Note

web.config file is still used to define Application Server Settings such as defining SMTP or TimeOuts.

Produce

{
  "Extensions": [
    "Intelledox.Extension.DatasourceBuiltin.OleDbDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.SqlServerDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.CsvDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.OdbcDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.RSSDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.WebserviceDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.XmlDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.InfinitiDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.JsonDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.RestDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.ActionBuiltin.FileAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.SQLServerAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.DownloadPageMessageAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.RedirectAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.EmailAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.PrintAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.UserAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.WebhookAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.RESTAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.OracleAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.PushNotificationAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.EscalationBuiltin.EmailEscalation, Intelledox.Extension.EscalationBuiltin",
    "Intelledox.Extension.EscalationBuiltin.ReassignmentEscalation, Intelledox.Extension.EscalationBuiltin",
    "Intelledox.Extension.EscalationBuiltin.PushNotificationEscalation, Intelledox.Extension.EscalationBuiltin",
    "Intelledox.Extension.ActionBuiltin.LogMessageAction, Intelledox.Extension.ActionBuiltin",
    "Intelledox.Extension.ActionBuiltin.SQLProjectResultsAction, Intelledox.Extension.ActionBuiltin"
  ],
  "AppSettings": {
    "Theme": "Infiniti2017XE"
  },
  "Authentication": {
    "Settings": {
      "CookiePrefix": "infiniti",
      "Timeout": "30"
    }
  }
}

Manage

{
  "Extensions": [
    "Intelledox.Extension.DatasourceBuiltin.OleDbDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.SqlServerDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.CsvDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.OdbcDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.RSSDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.WebserviceDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.XmlDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.InfinitiDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.JsonDatasource, Intelledox.Extension.DatasourceBuiltin",
    "Intelledox.Extension.DatasourceBuiltin.RestDatasource, Intelledox.Extension.DatasourceBuiltin"
  ],
  "AppSettings": {},
  "Authentication": {
    "Settings": {
      "CookiePrefix": "infiniti",
      "Timeout": "30"
    }
  },
  "Styles": {
    "Well": {
      "appliesto": "question,layout",
      "class": "well"
    },
    "Jumbotron": {
      "appliesto": "question,layout",
      "class": "jumbotron"
    },
    "Alert (success)": {
      "appliesto": "question,layout",
      "class": "alert alert-success"
    },
    "Alert (info)": {
      "appliesto": "question,layout",
      "class": "alert alert-info"
    },
    "Alert (warning)": {
      "appliesto": "question,layout",
      "class": "alert alert-warning"
    },
    "Alert (error)": {
      "appliesto": "question,layout",
      "class": "alert alert-danger"
    },
    "Label (default)": {
      "appliesto": "question",
      "class": "labelIx label-default"
    },
    "Label (primary)": {
      "appliesto": "question",
      "class": "labelIx label-primary"
    },
    "Label (success)": {
      "appliesto": "question",
      "class": "labelIx label-success"
    },
    "Label (info)": {
      "appliesto": "question",
      "class": "labelIx label-info"
    },
    "Label (warning)": {
      "appliesto": "question",
      "class": "labelIx label-warning"
    },
    "Label (error)": {
      "appliesto": "question",
      "class": "labelIx label-danger"
    }
  }
}

Legacy Extensions

Infiniti fully supports Extensions built against previous versions. However, the configuration should be moved from web.config to appsettings.json.

In general previous providers are added like a new extension except they have a wrapper that translates calls to the provider.

👍

Tips and tricks

If possible configure them in the site before upgrading to v10. That way the upgrade process will migrate the configuration files automatically.

To install them at a later date follow these instructions.

Actions

Add an entry to the Extensions node in appsettings.json in this format:

"Intelledox.Action.LegacyAction`1[[PROVIDER_TYPE_HERE]], Intelledox.Action"

For example:

"Extensions": [
  "Intelledox.Action.LegacyAction`1[[MyNamespace.MyAction, MyFilename]], Intelledox.Action"
]

Optional: If the action had additional attributes that were to be added to the node in the web.config, add them to the LegacyActions node in appsettings.json as properties under the type name.

For example:

"LegacyActions": {
  "MyNamespace.MyAction, MyFilename": {
    "setting1": "abc",
    "setting2": "xyz"
  }
}

Custom Question

Add an entry to the Extensions node in appsettings.json in this format:

"Intelledox.CustomQuestion.LegacyCustomQuestion`1[[PROVIDER_TYPE_HERE]], Intelledox.CustomQuestion"

For example:

"Extensions": [
  "Intelledox.CustomQuestion.LegacyCustomQuestion`1[[MyNamespace.MyCustomQuestion, MyFilename]], Intelledox.CustomQuestion"
]

Optional: If the custom question had additional attributes that were to be added to the node in the web.config, add them to the LegacyCustomQuestions node in appsettings.json as properties under the type name.

For example:

"LegacyCustomQuestions": {
  "MyNamespace.MyCustomQuestion, MyFilename": {
    "setting1": "abc",
    "setting2": "xyz"
  }
}

Data Source

Add an entry to the Extensions node in appsettings.json in this format:

"Intelledox.Datasource.LegacyDatasource`1[[PROVIDER_TYPE_HERE]], Intelledox.Datasource"

For example:

"Extensions": [
  "Intelledox.Datasource.LegacyDatasource`1[[MyNamespace.MyDataSource1, MyFilename1]], Intelledox.Datasource"
]

Required: Data sources were identified by name so that needs to be added as a configuration setting. If there are additional attributes that were to be added to the node in the web.config, add them to the LegacyDatasources node in appsettings.json as properties under the type name.

For example:

"LegacyDatasources": {
  "MyNamespace.MyDataSource, MyFilename": {
    "name": "Display name",
    "setting1": "abc",
    "setting2": "xyz"
  }
}

Escalation

Add an entry to the Extensions node in appsettings.json in this format:

"Intelledox.Escalation.LegacyEscalation`1[[PROVIDER_TYPE_HERE]], Intelledox.Escalation"

For example:

"Extensions": [
  "Intelledox.Escalation.LegacyEscalation`1[[MyNamespace.MyEscalation, MyFilename]], Intelledox.Escalation"
]

Optional: If the escalation had additional attributes that were to be added to the node in the web.config, add them to the LegacyEscalations node in appsettings.json as properties under the type name.
For example:

"LegacyEscalations": {
  "MyNamespace.MyEscalation, MyFilename": {
    "setting1": "abc",
    "setting2": "xyz"
  }
}

State

Add an entry to the Extensions node in appsettings.json in this format:

"Intelledox.State.LegacyState`1[[PROVIDER_TYPE_HERE]], Intelledox.State"

For example:

"Extensions": [
  "Intelledox.State.LegacyState`1[[MyNamespace.MyState, MyFilename]], Intelledox.State"
]

Optional: If the state had additional attributes that were to be added to the node in the web.config, add them to the LegacyStates node in appsettings.json as properties under the type name.

For example:

"LegacyStates": {
  "MyNamespace.MyState, MyFilename": {
    "setting1": "abc",
    "setting2": "xyz"
  }
}

Multiple Legacy Item Entries

For those cases when multiple custom items are needed, the syntax remains similar. As an example, multiple Data Sources would require a line for each in the appsettings.json file as follows:

"Extensions": [
    "Intelledox.Datasource.LegacyDatasource`1[[MyNamespace.MyDataSource1, MyFilename1]], Intelledox.Datasource",
 "Intelledox.Datasource.LegacyDatasource`1[[MyNamespace.MyDataSource2, MyFilename2]], Intelledox.Datasource"
 ]

and the equivalent additional information would be:

"LegacyDatasources": [
  {
  "MyNamespace.MyDataSource1, MyFilename1": {
    "name": "Display name",
    "setting1": "abc",
    "setting2": "xyz"
  },
  {
  "MyNamespace.MyDataSource2, MyFilename2": {
    "name": "Display name 2 ",
    "setting1": "abc",
    "setting2": "xyz"
  }
}