Glossary Item Box

Site structure: Site structure

SiteConfiguration: Provider configurationAliases configuration

See Also CmsDeveloperGuide Send comments on this topic.

Site configuration

To configure a site it is used a Web.config file that lies in a site root. Below it is quoted the keys that are used during the site configuration.

Web.config settings 

All of them are located in appSettings section of the web.config file.

Key

Description

Example

CMS_SiteKey

Site key in CMS system. This parameter is required.

<add key="CMS_SiteKey" value="TemplateSite"/>
HttpCompression_IsEnabled Traffic compression module setting. By default is False. Also recommended to turn on static files compression in IIS. <add key="HttpCompression_IsEnabled" value="True"/>
 

Other settings

All the site parameters listed below are tuned through the administrative interface in a “Site parameters” section.
You can define the following for every site:

  1. Site title, description and keywords.
  2. Site aliases.
  3. To show “friendly” error messages or to show ASP.NET error messages. By default the “friendly” error messages are shown. But if you don’t busy yourself with site debugging or tuning set up the ASP.NET error messages to be shown.
  4. Path to the icon which shows that there is a larger copy of the image. By default the path is "images/zoomin.gif". If this path is empty then the icon will not have the link to main image.
  5. Path to the avatar icon for a user without avatar icon. By default the path is "images/noAvatar.gif".

 

Mail setup 

For normal sending of post messages from the site you have to define the following parameters (through the site administrative interface in the “Site parameters” section):

  1. E-mail which is placed in a FROM field of each mail sent by the CMS system.

  2. E-mail, where the system messages from the CMS system go (system administrator’s E-mail).

  3. E-mail, where the messages for the site content manager go.

 

In order that the messages could be sent, it is also necessary to set up SMTP server parameters in web.config:

<configuration>

    ...

    <system.net>
        <mailSettings>
            <smtp>
                <network host="mail.mysite.com"/>
            </smtp>
        </mailSettings>
    </system.net>

</configuration>

 

Database connection setup

For normal work of the site you have to set up connection string to the CMS database, having added connection string with the CMS key in the web.config connectionStrings  section.
<connectionStrings>
    <add name="CMS" connectionString="User ID=site;password=pwd;Initial Catalog=CMS;Data Source=localhost" providerName="System.Data.SqlClient"/>
</connectionStrings>

 

If you use authorization or other ASP.NET applications services on the site (membership, profiles, role management, personalization or SQL web events) and a database for ASP.NET applications services is deployed not in the CMS database, you need to add connection string to this database also. Don’t forget also to set up providers.

<connectionStrings>

    ...

    <remove name="LocalSqlService"/>
    <add name="LocalSqlService" connectionString="User ID=site;password=pwd;Initial Catalog=aspnetdb;Data Source=localhost" providerName="System.Data.SqlClient"/>
</connectionStrings>

 

CMS Http handler

CMS system needs for its working a cms.ashx HTTP handler. Check that the web.config file contains its declaration:

<system.web>
    ...
    <httpHandlers>
        <add verb="GET,HEAD" path="cms.ashx" type="CMSLib.Pages.CmsHandler" validate="false"/>
    </httpHandlers>
</system.web>

  

ASP.NET web.config settings

For CMS correct working you also should set up some items of the web.config file. 

If your site doesn’t need ASP.NET sessions, we recommend you to switch them off:

<sessionState mode="None" />

 

If you use CMS modules (MailForm…) that can transmit HTML code in a request, switch the request verification on the site pages off:

<pages validateRequest="false"/>

 

We also recommend you to set up application culture settings for your site correctly:

<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="en-US" uiCulture="en"/>

 

You can also set up aliases for the site. It allows you to show different default pages when refer to the site from different domains.

 

Other important web.config settings

Maximum size of the uploaded file (in kilobytes): 

<system.web>
  ...
   <httpRuntime maxRequestLength="100000" />
</system.web>

 

Site structure: Site structure

SiteConfiguration: Provider configurationAliases configuration

 

 


© 2005-2007 Astron Digital Ltd. All Rights Reserved.