Skip to main content

Static Configuration

Some of the configuration - unlike the application setup - can not be enforced at runtime. Static configuration refers to those settings which are applied once at startup of the application can not be modified unless you restart the application.

There are four files in the Dime.Scheduler IIS website folder which group this startup time configuration:

  • web.config: General web application configuration
  • dime.config: Custom configuration developed by Dime Software
  • logging.config: Logging framework configuration
  • unity.config: Provider configuration

These files are chock-a-block with settings for the application to function smoothly. It is recommended to only modify the settings that are covered in the following sections.

Database connection strings

Locate the following code in web.config:

<connectionStrings>
<add name="SchedulerContext"
connectionString="data source=(localdb)\MSSQLLocalDB;initial catalog=Dime.Scheduler;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"
providerName="System.Data.SqlClient" />
</connectionStrings>

Connection strings are semicolon-delimited lists of key/value parameter pairs, and so they can contain heaps of information. How these are formed and what information they contain depends on the database server (such as SQL Server or MySQL) and version. By default a value similar to the one shown above is shipped. Administrators are free to change this connection string, but will have to make sure they refer the "data source" variable to the right database server and the "initial catalog" must refer to Dime.Scheduler's database name.

Configure SSL

Locate the following code in dime.config:

<!-- If set to true, the application will require a valid SSL certificate -->
<security sslEnabled="false" />

Configure multi tenancy

Locate the following code in dime.config:

<!-- If set to true, multi tenancy will be enforced throughout the application -->
<multiTenancy enabled="false" />

Environment variable

Environment variables will prove their value when multiple instances of Dime.Scheduler are running side by side, which is not recommended. Without the existence of a environment variable, messages from the test application could potentially end up in the production application. By passing such a variable, the system know where to route its messages to.

 <!-- Free text field to indicate the environment. Examples: prod, test, dev. This allows multiple instances of Dime.Scheduler on the same server -->
<environment mode="Production" />

Monitor Windows services uptime

Due to its plugin ecosystem, Dime.Scheduler may contain many connected systems. To inform the user of failing plugins, Dime.Scheduler's planning application is able to monitor other services. It is up to the administrator to decide which services to monitor.

Locate the following code in dime.config:

<!-- Configure the services to monitor.
Service names:
DimeSchedulerServiceBus,
DimeSchedulerBackOffice,
DimeSchedulerExchange
-->
<monitoring>
<service name="DimeSchedulerServiceBus" />
<service name="DimeSchedulerBackOffice" />
</monitoring>

In this example, Dime.Scheduler will ping regularly these two services. When a service does not respond, a warning message will be pushed to all connected users in the top bar.

The administrator can always see the status in the system view:

Service monitor

Logging level

Locate the following code in logging.config:

<logger name="Trace Logger">
<level value="WARN" />
<appender-ref ref="TracingAppenderDatabase" />
</logger>
<logger>
<level value="WARN" />
</logger>

The logging level determines how much information will be written in the Logs table. When requesting support or reporting a bug, setting the level to INFO or DEBUG may reveal useful information to Dime.Scheduler's support team.

The following level values are supported (in descending order of severity):

  • Fatal
  • Error
  • Warn
  • Info
  • Debug
  • All

This severity code is also reflected in the logs view:

Logs severity

E-mail service

Head over to the unity.config file and you'll find that we've done most of the work for you already. While these docs typically refrain from nerd talk, we need to get technical for just a second. This file is there to resolve dependencies through an XML-file. So long as the code adheres to a certain code contract, this coding pattern allows us to swap moving elements such as a mail service without having to change the code. By default, Dime.Scheduler uses SendGrid to send e-mails to the users. This can be overridden through this file.

There are two alternatives: SMTP and Office 365 (Graph API).

SMTP

SMTP stands for Simple Mail Transfer Protocol and has been around for decades. Pretty much every mail provider supports this protocol. The only thing that you need to do is fill out the 'value' attributes. We need a host, a port, an e-mail and a password to be able to send e-mails to the users.

<type type="IMailer" mapTo="SmtpMailer">
<lifetime type="lifetimeManager" />
<constructor>
<param name="host" value="smtp.gmail.com"/>
<param name="port" value="587"/>
<param name="defaultCredentials" value="false"/>
<param name="enableSsl" value="true"/>
<param name="email" value="[FROM]"/>
<param name="password" value="[FROM PASSWORD]"/>
</constructor>
</type>

Office 365 (Graph API)

Alternatively, you can use Office 365's services to send e-mails. Using an Azure AD App, you can grant Dime.Scheduler permissions to send e-mails. We just need a client id, tenant id, client secret and a valid e-mail address. This article guides you through the process of creating such an Azure AD app. Beware that for this service, Dime.Scheduler only needs the 'Mail.Send' application permission.

<type type="IMailer" mapTo="GraphMailer">
<lifetime type="lifetimeManager" />
<constructor>
<param name="clientId" value="[CLIENT]"/>
<param name="tenantId" value="[TENANT]"/>
<param name="clientSecret" value="[CLIENT SECRET]"/>
<param name="from" value="[FROM]"/>
</constructor>
</type>

SendGrid

As mentioned before, SendGrid is a cloud-based e-mail service. Dime.Scheduler provides this service for free and should not be any of your concern. However, if you wish to use your own key, you can do so easily by replacing the key value:

<type type="IMailer" mapTo="SendGridMailer">
<lifetime type="lifetimeManager" />
<constructor>
<param name="key" value="[YOUR_SENDGRID_KEY]"/>
</constructor>
</type>

Toggle real-time synchronization mechanism

By default, updates from back office systems and other users are automatically updated in user's browser. This has many advantages but it has an impact on performance, which some deem more important than a seamless experience.

In the dime.config file, locate the <signalR> element and set the enabled attribute to either true or false.

<signalR mode="Custom" enabled="true">
...
</signalR>