CMS Sitefinity Uncategorized

Ultimate Sitefinity Setup Guide: Part Two

This Guide

This guide is my ultimate guide to setting up Sitefinity.  I’ll be updating it as I find new things that I commonly do when I want to setup a new project.  Today, I’ll be going over common Visual Studio solution changes, Sitefinity Settings and more that I use on almost every project.

In Part One, I setup the base solution and continuous integration with Visual Studio Team Services.  This post will be more about actual settings in the Sitefinity project.

Storage Mode of Configurations

What is it?

Sitefinity has 4 separate configuration storage mechanisms that are explained pretty well in the documentation link.  The default mode is Auto Storage which means that environment based settings in the file system and application based settings are hosted in the database.  This mode is perfect for CI deployments as it allows application settings changes in multi-server environments and the environment settings should be settings that are rarely changed anyways.

On top of this, its possible to set remote servers configurations to Read-Only.  This is great because it prevents some users from accidentally making configuration settings that would cause your site to recycle.  It also prevents the server having changes that are not stored in source control.

To set all of this, you should add a web.config transform by right clicking on the web.config file and clicking the ‘Add Config Transform’.  Then find the transformation file you want to use and add the following code.

 <sitefinityConfig storageMode="Auto" restrictionLevel="ReadOnlyConfigFile" xdt:Transform="Replace"/>

Database Connection

Sitefinity by default stores its connection string in the DataConfig.config file found in the App_Data folder.  This makes multiple environment setups more difficult to maintain and prevents the ability to encrypt the connection string especially if there is a password field.  To accomplish this, do NOT delete the DataConfig.config but just remove the connection string line and add it to the web.config.


<?xml version="1.0" encoding="utf-8"?>
<dataConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="10.1.6502.0" initialized="True">


 <add name="Sitefinity" connectionString="data source=XXXXXXXXXX;Integrated Security=True;;initial catalog=PublicWebsite" providerName="System.Data.SqlClient" />

Web.config Transform

 <add name="local" connectionString="data source=XXXXXXXX;Integrated Security=True;;initial catalog=PublicWebsite" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>

Login HTTPS Security

It’s super important to setup HTTPS security for the login and Sitefinity is not setup like this by default.  The great news is that it takes very little to do. Documentation


 <wsFederation passiveRedirectEnabled="true" issuer="http://localhost" realm="https://localhost" requireHttps="true" />
 <cookieHandler requireSsl="false" />


 <add key="" membershipProvider="Default" realm="http://localhost" />
 <add key="" membershipProvider="Default" realm="https://localhost" />
 <add key="" membershipProvider="Default" realm="" />
 <add key="" membershipProvider="Default" realm="" />
 <add key="" realm="http://localhost" />
 <add key="" realm="https://localhost" />
 <add key="" realm="" />
 <add key="" realm="" />

Password Retrieval

While you’re in the SecurityConfig.config you should add your SMTP information for password recovery.  Here’s what it would look like

 <add enablePasswordRetrieval="true" recoveryMailAddress="" name="Default" config:flags="1" />

SMTP Settings


<smtpSettings host="" port="587" userName="" password="XXXXX" />


Sitefinity does a great job with the instructions for setting up ELMAH on their sites.  I’m just collecting everything here. Documentation

  1. Install ELMAH on SQL Server first
  2. Run added SQL script on Sitefinity database to create ELMAH stored procedures and tables.


<uiElmahSettings isElmahLoggingTurnedOn="True" />


Update your connection string

<add name="elmah-sqlserver" connectionString="data source=XXXXXXXX;Integrated Security=True;;initial catalog=XXXXXX" providerName="System.Data.SqlClient" />


A lot of the is the default options but once I tinkered with the above settings I was able to get this up in running in just a couple of hours.  I had zero experience with this before hand.  In part two, I will be describing listing out all of the Sitefinity settings that I feel should be automatically included and the way to set them up without running the solution.







By Brett The Whitt

Brett is a web development consultant and has been working for more than 12 years. He specializes in hybrid mobile app development and using front end frameworks such as AngularJS. Always passionate about continuous education, he has been most recently mentoring and encouraging his co-workers to become better speakers. To further this growth, he leads Lightning Talk Nights and other events at his job at HMB Inc

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s