Sitefinity 4.0 CTP – Configuration without the web.config

May 27, 2010 Digital Experience

Many of the web site configuration details for Sitefinity 3.x were stored in the web.config file.  Web.config is the main settings and configuration file for an ASP.NET web site. This file is an XML document that defines configuration information for the web application.

However, because this file is used for ASP.NET configuration (in addition to Sitefinity configuration), the web.config file became a place where Sitefinity configuration, Sitefinity customizations and ASP.NET configurations collided.  This overlap could then become an issue during Sitefinity upgrades.

With Sitefinity 4.0 we wanted to make upgrading Sitefinity as easy as possible.  To do this, we needed to minimize our reliance on the web.config.

Moving configuration settings outside the web.config

In Sitefinity 4.0 most of the configuration settings are now stored outside the web.config.  If you’re curious where these settings went, open a Sitefinity 4.0 CTP project and find the ~/App_Data/Sitefinity/Configurations directory.

The config files inside this directory contain XML.  New configuration settings can be applied to Sitefinity 4.0 by modifying these XML files.  However, it should not be necessary to edit these files by hand.  This isn’t necessary because Sitefinity 4.0 comes with a web-based configuration editor.

Configuring Sitefinity inside Sitefinity

Most developers will not need to become overly familiar with Sitefinity’s config files.  In most cases, Sitefinity’s configuration settings can be managed inside the CMS using the Configuration Editor.  To access the new configuration editor:

1.  Login to a Sitefinity 4.0 CTP web site

2.  Click the Settings dropdown menu

3.  Click the Configurations link

From here hundreds of Sitefinity configuration options (appearance, security, localization, widgets, layouts) can be accessed and managed.  All configuration changes will automatically be persisted to XML files.

Check out the official documentation for more details about Sitefinity configurations.

It gets even better

The way Sitefinity 4.0 manages configuration settings will make it easier to upgrade Sitefinity projects.  However, these external configuration files have another advantage; there can be multiple configurations.  As long as Sitefinity was reliant on the web.config file, there could be only one

However, Sitefinity 4.0 is not bound by that limitation.  Consequently, multiple configurations can be created and then attached to policies (users, roles, domains, etc.).  This allows Sitefinity to have a unique configuration for a unique setting.

I’ll write a lot more about this later.  Configurations + policies will open new opportunities for adaptive interfaces, tools and configurations.  I’m very excited about some of these opportunities.

Give it a try

If you haven’t already, please download the Sitefinity 4.0 CTP.   As always, we welcome your feedback in the Sitefinity 4.0 Forums.

The Progress Team