Configuration & Settings

Configuring Weavy instances is important in order for everything to run smoothly. The configuration spans multiple areas and most are straight forward, while others needs a bit of explaining.

This section will describe the configuration settings that are available and the methods you can use for specifying them.

Specifying the Configuration

All settings are configured through the App Settings schema, which is a predefined configuration section provided by the .NET Framework. Most commonly, settings are defined within the appSettings element in the web.config file, but there are also other ways to configure settings.

<add key="weavy.smtp-from" value="noreply@weavy.com" />
<add key="weavy.smtp-server" value="smtp.hostname.com" />
<add key="weavy.smtp-port" value="25" />
<add key="weavy.smtp-ssl" value="false" />
<add key="weavy.smtp-username" value="usr" />
<add key="weavy.smtp-password" value="pass" />
- etc. -

Configure using an external file

The appSettings element has an optional attribute, file, that can be used to reference a external file that contains the configuration. This is especially useful when you don't want settings to be under source control. In this case the appSettings element will reference a file which could be excluded from source control.

<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
    <add key="weavy.smtp-server" value="smtp.hostname.com" />
</appSettings>
The external XML file settings.config.

<configuration>
    <appSettings file="settings.config" />
</configuration>
Web.config, referencing the external XML file.

Configuration in Azure

Azure has mechanisms for configuring AppSettings through the Application settings for apps. Any settings that are defined here will affetively override what is configured in web.config or in an external file.

If you are hosting your Weavy instances in Azure, this is the preferred way to manage the configuration of the instances.

Deployment Manager

When you deploy Weavy instances through the Deployment Manager or Deployment API configuration settings will automatically be applied to reflect what you specified during installation of the Deployment Manager. So normally you will not need to handle the configuration seperately, although it is still possible to specify additional settings at the time of deployment or to update the configuration at any time using the manager or the API.

To view or edit the configuration for a deployed instance, go to the details view of the instance. The Settings tab lists all settings. Edit/add rows and click Save to update.

Retrieve Settings

Use the ConfigurationService to retrieve settings. All built-in settings are available as strongly typed properties. Use the ConfigurationService.AppSetting() method to retrieve custom settings.

Available settings

Name Description Default
weavy.active-directory-domain The name of the Active Directory domain or server to authenticate against.
weavy.active-directory-username The username to use when authenticating users against the active directory.
weavy.active-directory-password The password to use when authenticating users against the active directory.
weavy.application-name The name of the application Weavy
weavy.application-url The absolute url to the installation, e.g. https://company.incloud.com
weavy.domain-whitelist The whitelisted domains for invites and sign ups. Sign-ups and invites with these email domains are automatically approved. Separate multiple entries with comma, e.g. example.com, example.org
weavy.custom-authentication-endpoint The full url to a custom authentication endpoint. Must start with https://.
weavy.https Set to true to force traffic over HTTPS. true
weavy.hsts Set to true to enable HTTP Strict Transport Security (HSTS). true
weavy.invites Set to true to enable users to send account invites.
weavy.jwt-secret The shared secret to use for Widget SSO.
weavy.messenger-notification-hub-connection-string The connection string for the Messenger notification hub.
weavy.messenger-notification-hub-path The Messenger notification hub path.
weavy.notification-hub-connection-string The connection string for the notification hub.
weavy.notification-hub-path The notification hub path.
weavy.password-length The minimum required password length.
weavy.password-requires-digit Set to true to require atleast one digit (0-9) in passwords. false
weavy.password-requires-lower Set to true to require atleast one lower case letter (a-z) in passwords. false
weavy.password-requires-upper Set to true to require atleast one upper case letter (A-Z) in passwords. false
weavy.password-requires-special Set to true to require atleast one special character (non letter or digit) in passwords.
weavy.signups Set to true to allow people to sign up for an account. false
weavy.smtp-from The email address from which outgoing emails should be sent.
weavy.smtp-password The password to use for authentication against the SMTP server.
weavy.smtp-port The port used for SMTP transactions. 25
weavy.smtp-server The name or IP address of the host used for SMTP transactions.
weavy.smtp-username The username to use for authentication against the SMTP server.
weavy.smtp-default-credentials Set to true to ignore username and password and send the default credentials with requests. false
weavy.smtp-ssl Set to true to use Secure Sockets Layer (SSL) to encrypt the connection with the SMTP server. false