Glossary Item Box
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.
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"/> |
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:
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):
E-mail which is placed in a FROM field of each mail sent by the CMS system.
E-mail, where the system messages from the CMS system go (system administrator’s E-mail).
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>
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 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>
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. |
Maximum size of the uploaded file (in kilobytes):
<system.web> |
| See Also |
Site structure: Site structure
SiteConfiguration: Provider configuration | Aliases configuration
© 2005-2007 Astron Digital Ltd. All Rights Reserved.