Return to doc.sitecore.com

  Web.config changes in Sitecore CMS 6.4.1 rev. 120113 compared to Sitecore CMS 6.4.1 rev. 111003

Select the link below to download the Web.config file of the default Sitecore CMS 6.4.1 rev. 120113 installation:

Notice that in this update, two changes have been made in the /sitecore_files/Web.config file, as described below, so you should make changes to both the Web.config file and the /sitecore_files/Web.config file.

Below is the list of changes made to the Web.config file of Sitecore CMS 6.4.1 rev. 120113 as compared to the Web.config file of Sitecore CMS 6.4.1 rev. 111003:

  1. The interpolation mode for dynamically scaled images will now be using the value of the Media.InterpolationMode setting in the web.config, which by default is set to "High", whereas dynamically scaled images in previous versions would be resized using the "HighQualityBicubic" interpolation mode. The difference should be minor for most use cases, but we recommend that customers who need the best possible quality change the Media.InterpolationMode setting to "HighQualityBicubic".
  2. Add the following node in the <system.web><httpModules> section, just before the Sitecore.Nexus.Web.HttpModule (notice that the module should already be present in the <system.webServer><modules> section and that it should be present in both sections):
    <add type="Sitecore.Web.RewriteModule, Sitecore.Kernel" name="SitecoreRewriteModule"/>
  3. A new attribute ("lowercaseUrls") has been added to the linkManager/providers section with a default value of "false", so that the entire linkManager section now looks like this:
    <!-- Options (first is default):
           addAspxExtension: true | false (If you set this to false, remember to configure IIS to map all requests (*) to ASP.NET)
           alwaysIncludeServerUrl: false | true
           encodeNames: true | false
           languageEmbedding: asNeeded | always | never
           languageLocation: filePath | queryString
           lowercaseUrls: true | false
           shortenUrls: true | false
           useDisplayName: false | true
    -->
    <linkManager defaultProvider="sitecore">
      <providers>
        <clear />
        <add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="true" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="asNeeded" languageLocation="filePath" lowercaseUrls="false" shortenUrls="true" useDisplayName="false" />
      </providers>
    </linkManager>
  4. Add the following node as the first one in the <sitecore><mediaLibrary> section:
    <!-- MEDIA PROVIDER
       The media provider used to generate URLs, create media items, control media caching, parse media requests, and other
       media related functionality.     
    -->
    <mediaProvider type="Sitecore.Resources.Media.MediaProvider, Sitecore.Kernel"/>
  5. Add the following setting to the <settings> section. If the editors of your site should be allowed to insert script into RTE fields, change the value of this setting to "false". Otherwise existing script will be removed from RTE fields the next time the editor saves items that contain script:
    <!--  HTML EDITOR REMOVE SCRIPTS
          If true, the rich text editor removes script tags from RTE field values before saving. Setting the value to true reduces the potential for cross-site scripting and other script-related issues.
          Default value: true
    -->
    <setting name="HtmlEditor.RemoveScripts" value="true"/>
  6. Add the following setting to the <settings> section:
    <!--  MEDIA ALWAYS INCLUDE SERVER URL
          If true, Sitecore will generate absolute URLs when it uses the MediaProvider API and/or the link provider to render media URLs.
          If blank, Sitecore will use the same value as the alwaysIncludeServerUrl attribute from the link provider.
          Default value: "" (use the value from the link provider)
    -->
    <setting name="Media.AlwaysIncludeServerUrl" value=""/>
  7. Add the following setting to the <settings> section:
    <!--  MEDIA - DEFAULT IMAGE BACKGROUND COLOR
          The default background color for dynamically resizing images to different aspect ratios than the originals.
          Sitecore applies this background color only for image types that do not support transparency (image/jpeg, image/gif and image/bmp).
          When resizing any other image types (including image/png), Sitecore always applies a transparent background.
          You can specify a color name (such as Black or Red) or a hex color code (such as #CE55E2).
          If you specify no value, Sitecore applies a black background color when resizing such images.
          Default value: ""
    -->
    <setting name="Media.DefaultImageBackgroundColor" value=""/>
  8. Add the following three settings to the <settings> section:
    <!--  MEDIA - RESIZING - QUALITY
          Specifies the level of compression to use when resizing images.
          See also the System.Drawing.Imaging.Encoder.Quality field.
          The range of values is 0 (lowest quality) to 100 (highest quality).
          Default value: 95
    -->
    <setting name="Media.Resizing.Quality" value="95"/>
    <!--  MEDIA - RESIZING - COMPOSITING MODE
          Specifies how the source colors are combined with the background colors when resizing images.
          See also the System.Drawing.Drawing2D.CompositingMode enum.
          Valid values:  SourceOver  (the source color is blended with the background color, as determined by the alpha component of the source color)
                         SourceCopy  (the source color overwrites the background color)
          Default value: SourceCopy
    -->
    <setting name="Media.Resizing.CompositingMode" value="SourceCopy"/>
    <!--  MEDIA - RESIZING - PIXEL OFFSET MODE
          Specifies how pixels are offset when resizing images.
          See also the System.Drawing.Drawing2D.PixelOffsetMode enum.
          Valid values:  Default     (default)
                         HighSpeed   (high speed, low quality)
                         HighQuality (high quality, low speed)
                         None        (no pixel offset)
                         Half        (pixels are offset by -.5 units, for high speed antialiasing)
          Default value: Half
    -->
    <setting name="Media.Resizing.PixelOffsetMode" value="Half"/>
  9. Add the following two settings to the <settings> section:
    <!--  RENDERING - SITE RESOLVING MATCH CURRENT LANGUAGE
          Affects how cross-site links are rendered when Rendering.SiteResolving is enabled.
          If true, the link provider will take the language attribute of the site definitions into consideration when resolving
          which site/hostname to use when rendering a cross-site link.
          Default value: true
    -->
    <setting name="Rendering.SiteResolvingMatchCurrentLanguage" value="true"/>
    <!--  RENDERING - SITE RESOLVING MATCH CURRENT SITE
          Affects how cross-site links are rendered when Rendering.SiteResolving is enabled.
          If true, the link provider will check if the target item is located under the start item for the current site before it
          tries to find a match in the full list of site definitions. This ensures that when the target item can be resolved using
          the current site, the target link will not change to a different site/hostname.
          Default value: true
    -->
    <setting name="Rendering.SiteResolvingMatchCurrentSite" value="true"/>

Below is the list of changes made to the /sitecore_files/Web.config file of Sitecore CMS 6.4.1 rev. 120113 as compared to the /sitecore_files/Web.config file of Sitecore CMS 6.4.1 rev. 111003:

  1. Add the following node to the <system.webServer> section:
    <modules>
      <remove name="SitecoreRewriteModule"/>
    </modules>
  2. Add the following node to the <configuration> section:
    <system.web>
      <httpModules>
        <remove name="SitecoreRewriteModule"/>
      </httpModules>
    </system.web>