Enabling composite files for On-Premise and Webfarm environments

Overview

Administrators will be required to adjust the web.config file for enabling composite files for the Client Resource Management module. In a web farm configuration, the web.config needs to be modified in order to avoid 500 errors and file locks with the composite file.

 

Prerequisites

 

Solution

On-Premise Solution

  1. Access the web.config file for editing. Please follow the steps in our article Access web.config for further instructions.
  2. Make sure the bolded entries are the entries that exist and are uncommented.
    <compositeFiles defaultFileProcessingProvider="DnnCompositeFileProcessor" compositeFileHandlerPath="~/DependencyHandler.axd">
    <fileProcessingProviders>
    <add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="false" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/ClientDependency" bundleDomains="" urlType="MappedId" />
    <!-- For webfarms remove the above CompositeFileProcessor and uncomment this section
    <add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="false" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/ClientDependency" bundleDomains="" urlType="Base64QueryStrings" /> -->
    <add name="DnnCompositeFileProcessor" type="DotNetNuke.Web.Client.Providers.DnnCompositeFileProcessingProvider, DotNetNuke.Web.Client" enableCssMinify="false" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/ClientDependency" bundleDomains="" urlType="Base64QueryStrings" />
    </fileProcessingProviders>
    </compositeFiles>
  3. Click on the Save Changes button to save your modifications.

Web Farm | Load Balancer Solution

  1. Access the web.config file for editing. Please follow the steps in our article Access web.config for further instructions.
  2. Make sure the bolded entries are the entries that exist and are uncommented. Delete the first CompositeFileProcessor entry.
    <compositeFiles defaultFileProcessingProvider="DnnCompositeFileProcessor" compositeFileHandlerPath="~/DependencyHandler.axd">
    <fileProcessingProviders>
    <add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="false" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/ClientDependency" bundleDomains="" urlType="MappedId" />
    <!-- For webfarms remove the above CompositeFileProcessor and uncomment this section
    <add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="false" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/ClientDependency" bundleDomains="" urlType="Base64QueryStrings" /> -->
    <add name="DnnCompositeFileProcessor" type="DotNetNuke.Web.Client.Providers.DnnCompositeFileProcessingProvider, DotNetNuke.Web.Client" enableCssMinify="false" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/ClientDependency" bundleDomains="" urlType="Base64QueryStrings" />
    </fileProcessingProviders>
    </compositeFiles>
  3. Click on the Save Changes button to save your modifications.

The caveat for using base64QueryStrings is that some proxies like to strip out or modify query strings from the request which in some very rare cases have caused issues. This doesn't work with origin pull CDNs like Cloud Front because they don't support query strings, dependencies need to be split depending on the max query string length as there is only so much data you can fit into a URL.

 

Take a look at the Composite File Wiki to view the different attributes you can apply to these entries.

 

Comments

0 comments

Please sign in to leave a comment.