The configuration of the CSO Gateway is managed by the CsoGatewayConfigSection configuration section that can be added to the web.config. This configuration section is optional, if it is omitted, the CSO Gateway will still function with its default settings.

Below is a template of a configuration section for the CSO Gateway. You can copy-paste it in your web.config. The ToClientSide and ToServerSide elements are required but all the other elements and attributes are optional. To understand the effect of each elements and attributes refer to the documentation for the CsoGatewayConfigSection class.

First, the configuration section must be declared in the <configSections> element of the web.config. Then the CsoGatewayConfigSection can be put anywhere inside the <configuration> element.

CopyCsoGatewayConfigSection template
<configuration>
    <configSections>
        <section name="CsoGatewayConfigSection" type="ca.metaobjects.csogateway.Configuration.CsoGatewayConfigSection, ca.metaobjects.csogateway"/>
        <!-- Other config section declaration -->
    </configSections>
    <CsoGatewayConfigSection>
        <ToClientSideConfig DefaultNamespace="DefaultNamespace" IgnoreBaseClass="false"
        ExceptionOnPrecisionLossInt64="true" ExceptionOnPrecisionLossUInt64="true" ExceptionOnPrecisionLossDecimal="true">
            <ClientSideNamespaceOfTypes>
                <add TypeFullName="MyNamespace.MyClassName" Value="NamespaceOnClientSide" />
                <add TypeFullName="MyNamespace.MyStructName" Value="NamespaceOnClientSide" />
                <add TypeFullName="MyNamespace.MyInterfaceName" Value="NamespaceOnClientSide" />
                <add TypeFullName="MyNamespace.MyEnumName" Value="NamespaceOnClientSide" />
                <add TypeFullName="DotNetNamespace.DotNetEnumName" Value="NamespaceOnClientSide" />
            </ClientSideNamespaceOfTypes>

            <ExtensionUrls>
                <add TypeFullName="MyNamespace.MyClassName"  Value="/MyWebApplication/FileExtension/ExtensionForMyClass.js" />
                <add TypeFullName="MyNamespace.MyStructName"  Value="http://www.mydomain.com/MyWebApplication/ExtensionForMyStruct.js" />
                <add TypeFullName="MyNamespace.MyInterfaceName"  Value="/MyWebApplication/FileExtension/ExtensionForMyInterface.js" />            
            </ExtensionUrls>
        </ToClientSideConfig>
        <ToServerSideConfig>
        </ToServerSideConfig>
    </CsoGatewayConfigSection>

    <!-- Other config sections -->
<configuration>