SDT.FieldServer.Service.exe.config*

..\Program Files (x86)\CartoPac\bin\SDT.FieldServer.Service.exe.config

CartoPac allows for three different settings to be altered in the SDT.FieldServer.Service.exe.config file including:

  • Database Connections

  • Oracle Client Connection Settings

  • SMTP Host Settings

Database Connections

In CartoPac Server, a connection to a table in a database other than the CartoPac System Database may be necessary for configuring External Lookups.

A database Connection may be established by placing a <connectionStrings> node in the SDT.FieldServer.Service.exe.config.

The connectionStrings node must be placed under the parent <configuration> node and after the <configSections />.
Example:

  <configuration>
  <configSections>
  </configSections>
  <connectionStrings>
  </connectionStrings>
</configuration>

Oracle

<connectionStrings>
  <add connectionString="User Id=USER;Password=PASSWORD;Data Source=HOST[:PORT]/SERVICE_NAME;Connection Timeout=60;" name="DATABASE_NAME" />
</connectionStrings>

MSSQL

<connectionStrings>
  <add connectionString="User=USER;Password=PASSWORD;Data Source=SERVER_INSTANCE;Initial Catalog=DATABASE;MultipleActiveResultSets=true;" name="DATABASE_NAME" />
</connectionStrings>

Postgres

<connectionStrings>
  <add connectionString="user id=user;password=PASSWORD;server=ServerName; database=DATABASE_NAME; port=PortNumber;" name="DATABASE_NAME" />
</connectionStrings>

SDT.FieldServer.Service.exe.config

Oracle Connection Settings

When utilizing external lookup tables stored in Oracle, one of three connection types may be used including either:

  • EZCONNECT

  • TNS

  • LDAP

EZConnect Settings will bypass TNS or LDAP connection settings.

When the Oracle connection type stored in the SDT.FieldServer.Service.exe.config file utilizes either TNS or LDAP settings, an additional node may be required to define where the TNS_ADMIN directory is that contains settings the service requires for the Oracle database connection.

Add a value to the TNS_ADMIN setting under the <oracle.manageddataaccess.client> node:

  <oracle.manageddataaccess.client>
    <version number ="4.121.2.0">
      <settings>
        <setting name="TNS_ADMIN" value="[TNS_ADMIN\DIRECTORY\HERE]"/>
      </settings>
    </version>
  </oracle.manageddataaccess.client>

SDT.FieldServer.Service.exe.config - Oracle

Oracle Client Settings

Oracle Client Settings Un-commented by default.

  • When Using Oracle — the Type of Oracle Client used (Managed|Unmanaged) must be specified in the config file.

  • When Using SQL Server | Postgres — all Oracle Client settings must be commented out.

  • DbProviderFactories Section — specify the appropriate Oracle driver by un-commenting the appropriate Client node (the other node must be commented out or removed):

    • Managed Client:

      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

    • Unmanaged Client:

      <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

      XML may be commented out using <!--commented out xml-->.

      When using the Unmanaged Oracle Client, the Oracle.DataAccess.EntityFramework.dll must be copied into the ..\Program Files (x86)\CartoPac\bin directory. The Unmanaged Oracle.DataAccess.EntityFramework.dll file can be found in the Oracle Home Directory, %ORACLE_HOME%\product\12.1.0\client_x\ODP.NET\bin\4\EF6.

  • Entity Framework Section — specify the appropriate Oracle Client by un-commenting the appropriate node (The other node must be commented out or removed):

    • Managed Client:

      <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

    • Unmanaged Client:

      <provider invariantName="Oracle.DataAccess.Client" type="Oracle.DataAccess.EntityFramework.EFOracleProviderServices, Oracle.DataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

      XML may be commented out using <!--commented out xml-->.

      When using the Unmanaged Oracle Client, the Oracle.DataAccess.EntityFramework.dll must be copied into the ..\Program Files (x86)\CartoPac\bin directory. The Unmanaged Oracle.DataAccess.EntityFramework.dll file can be found in the Oracle Home Directory, %ORACLE_HOME%\product\12.1.0\client_x\ODP.NET\bin\4\EF6.

SMTP Host Settings

In some CWM configurations, the CartoPac Workflow Manager may use an Email Transition to send email notifications with web links to specific features for direct access from email. When using Email Transitions, each email is sent by the CartoPacServer service through an SMTP mailhost that must be configured as a setting in the SDT.FieldServer.Service.exe.config file.

To set up an SMTP mailhost, modify the network host and port settings for the appropriate SMTP host server:

  <system.net>
    <mailSettings>
      <smtp>
        <network host="smtpservername.com" port="25" defaultCredentials="true"/>
      </smtp>
    </mailSettings>
  </system.net>

SDT.FieldServer.Service.exe.config - SMTP Mail Settings