DataConnect Service

In this topic: Hide

 

The Data Connect service is the communication service to ATS data structures. For CM4D, it connects the mail server to CM4D-generated events.

Dependencies: none

Requirements: DataConnect service configuration file.

DataConnect Configuration File

The Host Config file is the configuration file for the ATS DataConnect service. It contains the connection information for the mail server and the CM4D Site Database. This config file is included in the CM4D installation folder. Default path:

Mail Settings

This section of the config file is where you enter the settings for your SMTP server connection. If you will be using Authentication, this is also where the credentials are set. Depending on your server type, configure using one of the following options.

Tip
Once the service is started, you can look at the entries in the Windows Event Viewer to see which mode (authentication or anonymous) is running.

Option 1 - SMTP with Authentication

Use this option if you are using an SMTP server that requires authentication. Set the following:

·        from - The user email address from which the event notifications are sent. This user appears in the "From" field in the email.

·        host - The server address of the SMTP mail server.

·        password - The password for the Authentication user name.

·        port - The port number used to connect to the SMTP mail server. It must match the SMTP port used on your mail server.

·        userName - The email of the user who will be used to log in to Authenticate on the mail server.

Example of Option 1

Option 2 - SMTP with Anonymous Relay

Use this option if you are using an SMTP server that does not require authentication. Set the following:

·        from - The user email address from which the event notifications are sent. This user appears in the "From" field in the email.

·        host - The server address of the SMTP mail server.

·        password - Leave blank.

·        port - The port number used to connect to the SMTP mail server. It must match the SMTP port used on your mail server.

·        userName - Leave blank.

Example of Option 2

Connection Strings

This section of the config file is where you enter the database settings to connect to your CM4D Site database. The DataConnect service may connect to the CM4D database using either SQL or Windows Authentication. Depending on your connection type, configure using one of the following options.

Option 1 - CM4D Site Database Connection with SQL Authentication

To connect to a database that uses SQL Authentication, configure this section. This is the default enabled option. Set the following:

·        Data Source - The name of the server hosting the CM4D database. Include the instance name if applicable.

·        Initial Catalog - The name of the CM4D Site Database.

·        User Id - The name of the SQL Authentication user for the CM4D Site database.

·        Password - The password of the SQL Authentication user.

Example of Option 1

Option 2 - CM4D Site Database Connection with Windows Authentication

To connect to a database that uses Windows Authentication, comment out the previous section for SQL Authentication and use this section. This is not the default enabled option. Set the following:

·        Data Source - The name of the server hosting the CM4D database. Include the instance name if applicable.

·        Initial Catalog - The name of the CM4D Site Database.

·        Persist Security Info = True (do not modify)

·        Integrated Security = True (do not modify)

Example of Option 2

Host

This section is to set the server name and port for the DataConnect service. The host information here must match the client endpoint information in the EventSmith configuration file. Set the following:

·        baseAddress - enter the name of the server that is hosting the DataConnect service and the port number used by the DataConnect host server to connect to the EventSmith host server (the port must be the same as the port set in the Client Address in the EventSmith configuration file).

Configuration Example

Configure DataConnect

1.     Edit the file ATS.CM4D.DataConnect.Host.exe.config.

2.     Set the event email information:
     <smtp from="[email protected]">

a.     SMTP From - Enter the user email address from which the event notifications are sent. This user appears in the "From" field in the email.

3.     Set the SMTP server information:
     <network host="your.smtp.server.name" port="25" userName="user" password="password" enableSsl="false"/>

a.     Mail Server- Enter the server address of the SMTP mail server.

b.     Mail Server Port - The port number used to connect to the SMTP mail server. It must match the SMTP port used on your mail server.

c.      SMTP Authentication Type - Pick one of the two authentication types as corresponds to your mail server.

i.        With Authentication
     userName="user" password="password"

(1)  Mail User Name - The email of the user who will be used to log in to Authenticate on the mail server.

(2)  Mail User Password - The password for the Authentication user name.

ii.      Without Authentication (Anonymous Relay)
     userName="" password=""

(1)  Mail User Name - Leave empty/blank.

(2)  Mail User Password - Leave empty/blank.

4.     Set the Database connection information. Pick one method, either SQL or Windows Authentication:

a.     SQL Authentication
     <add name="CM4DSiteConnString" connectionString="Data Source=DB_ServerName\instance;Initial Catalog=SiteDBName;User Id=siteUser;Password=userPassword;multipleactiveresultsets=True;" providerName="System.Data.SqlClient"/>

i.        CM4D Db Server - Enter the name of the database server. If using a Named Instance, include this in the server name.

ii.      CM4D Site Database - Enter the CM4D Site database name.

iii.    SQL User ID - Enter the name of the SQL Authentication user for the CM4D Site database.

iv.    SQL User Password - Enter the password for the SQL user.

b.     Windows authentication
     <add name="CM4DSiteConnString" connectionString="Data Source=DB_ServerName\instance;Initial Catalog=SiteDBName;Persist Security Info=True;Integrated Security=True" providerName="System.Data.SqlClient" />

i.        CM4D Db Server - Enter the name of the database server. If using a Named Instance, include this in the server name.

ii.      CM4D Site Database - Enter the CM4D Site database name.

5.     Set the DataConnect service host information:
     <add baseAddress="net.tcp://server98:8523/CM4DDB_Service"/>

a.     Service Server - Enter the name of the server that is hosting the DataConnect service.

b.     Service Port - Enter the port number used by the DataConnect host server to connect to the EventSmith host server (it must be the same as the port set in the EventSmith config).

6.     Save the config file.