Documentation

Web.config

Cassette provides the following configuration section for use in your application's web.config file:

<configuration>
    <configSections>
        <section name="cassette" type="Cassette.CassetteConfigurationSection, Cassette" />
    </configSections>

    <cassette
        debug="true|false"
        rewriteHtml="true|false"
        allowRemoteDiagnostics="true|false"
        cacheDirectory="directory-path" 
        isolatedStoragePerDomain="true|false" />
        
    ...
</configuration>

The entire configuration section is optional.

The debug property

When false, bundles are optimized (concatenated, minified, etc).

When true, the original, un-optimized assets are used to make debugging easy.

When missing, the value of <system.web>/<compilation debug="true|false"> is used.

The rewriteHtml property

When true (the default), Cassette will rewrite HTML page output to allow bundles to be referenced in the <head> even after it has been rendered.

The allowRemoteDiagnostics property

Defaults to false.

When true, the /cassette.axd diagnostics page is accessible from clients other than the current localhost.

The cacheDirectory property

Configures where Cassette will cache optimized bundle content.

When empty (the default) Isolated Storage is used. Otherwise, this should be a file system path. It can be relative to the web application's root directory.

The isolatedStoragePerDomain property

Configures whether Isolated Storage should be isolated to the AppDomain (true) or to the assembly (false). This should normally be false unless you are using the same assembly with the same path in multiple websites (for example, you have the one application running in several different virtual directories). Defaults to false.