This page contains reference information about the web.config settings for Roadkill, and expects you to have some knowledge of .NET XML configuration files/web.config files.
Roadkill stores almost all of its configuration settings in the web.config file. This is written to during the installation, based on the settings you provide. The web.config file contains a custom roadkill section which contains the bulk of the settings, below
is an example:
- adminRoleName - the role name for editors. This can also contain one, or a comma separated list of Active Directory groups that are editors if Windows authentication is enabled.
- attachmentsFolder - the folder images and files are uploaded to. This can be an absolute file path (including a UNC path), or if the value starts with "~/" then the website root is used.
- cacheEnabled - true/false. If enabled, the NHibernate database cache is turned on. You can over-ride this setting using the NHibernate section shown below.
- cacheText - true/false. If true, the text content for each page is cached until the page is edited.
- connectionStringName - the name of the connection string from the connectionStrings section, defaults to "Roadkill".
- databaseType - the database server type used to store the roadkill data. Valid values include db2, firebird, mysql, postgres, sqlite, sqlserver2005, sqlserver2008, sqlserverce. Note Roadkill doesn't ship with the .NET drivers for all of these
database types, just SQL Server, SQL Server CE and SQLite. If you want to use another database that isn't listed here but NHibernate supports, you can over-ride this in the NHibernate section.
- editorRoleName - the role name for editors. This can also contain one, or a comma separated list of Active Directory groups that are editors if Windows authentication is enabled.
- installed true/false. If false, the installer wizard will display when you visit the site.
- ldapConnectionString - If windows authentication is enabled, this should be the connection string to the Active Directory LDAP server, including LDAP:// at the start of the string.
- ldapUsername - If windows authentication is enabled, this is the username used to connect to the Active Directory server, which is typically a service account.
- ldapPassword - If windows authentication is enabled, this is the password for the username used to connect to the Active Directory server.
- ignoreSearchIndexErrors - (optional) true/false. Whether search index errors are ignored when pages are created or edited. Defaults to true.
- isPublicSite (optional) true/false. If set to false, then all pages require a log in to view.
- resizeImages - (optional) true/false. This setting will cause images that are too big to be automatically resized, using a jQuery plugin. Defaults to true.
- userManagerType (optional) if set, this class (which should inherit from Roadkill.Core.UserManager) will be used for authenticating users. The format of this setting should be "Namespace.Type, Assemblyname" or a similar valid type
string. See the Users and Permissions page for details on creating your own implementation.
- useHtmlWhiteList (optional) if set, this will strip all HTML tags/attributes from the markup of each page (not the Theme HTML, just the markup) which don't exist in the App_Data/htmlwhitelist.xml file. True by default.
- useWindowsAuthentication - Whether Windows Active Directory authentication should be used.
The connection string section will look this for a default roadkill installation:
<add name="Roadkill" connectionString="(your connection string)" />
There is usually no reason to change the name of the connectionString in this section as it ties in with the connectionName setting inside the roadkill section.
Settings that are stored in the database
The following settings are not stored in the roadkill web.config section but in the database, and are not critical for the running of the application but preferences.
Advanced NHibernate configuration
While Roadkill automatically configures NHibernate for you (based on your roadkill section settings) when your application starts, you can over-ride these settings if you choose if you are familiar with NHibernate configuration.
This is particularly useful if you want to specify a different database driver or dialect, or if you want to use a cache server for the 2nd level cache settings for a web farm environment.
The NHibernate section is inside the roadkill web.config but is commented out, as shown below:
<!-- ============ NHibernate ============ -->
<!-- If you want to manually tweak NHibernate, uncomment this section. -->
<!-- etc. -->
Changing the language of the site
If you want to force the language of your site to something other than the one installed on the server, you can do this using the <globalization> tag inside the <system.web> section. This element is included in the Roadkill web.config, the example
below shows how to force the site to use Spanish (Spain), a full list of valid locale names can be found at
<globalization uiCulture="es-ES" culture="es-ES" />
Email server settings
If you have setup the Roadkill installation to allow signups from users, you will want to setup a mail server that the signup and lost emails are sent via. This can be done via the system.net section which is included in the Roadkill web.config by default,
but is configured so that all emails are written as files to a drop folder. Below are the default settings, full details can be found on MSDN
<!-- Change these settings for signup and lost password emails -->
<smtp deliveryMethod="SpecifiedPickupDirectory" from="email@example.com">
<specifiedPickupDirectory pickupDirectoryLocation="C:\inetpub\temp\smtp" />