My page contains a single component presentation using a component template with output format "ASCX WebControl", being published as a dynamic component presentation and with the "Allow on Page Using Dynamic Assembly" box checked. The component presentation is being published to the content broker database.

After publishing the page I view the rendered file in a text editor, I notice:

    <div><tridion:ComponentPresentation runat="server" PageURI="tcm:8-82-64" ComponentURI="tcm:8-80" TemplateURI="tcm:8-89-32"/></div>

When viewed in a web browser I see:

"CPAssembler error: Web control file is not located inside your website"

I have checked my license file, my jars, dlls and config files and all seem to be in order when compared to another working example.

The application is a .net 3.5 app and the web.config contains:

          <add tagPrefix="tridion" namespace="Tridion.ContentDelivery.Web.UI" assembly="Tridion.ContentDelivery" />
 <add tagPrefix="smarttarget" namespace="Tridion.SmartTarget.Web.UI" assembly="Tridion.SmartTarget"/>
       <add type="Tridion.ContentDelivery.Web.WAI.WAIModule, Tridion.ContentDelivery" name="TridionWAIHttpModule" /> 

    <compilation defaultLanguage="c#" debug="true" />

. . .
    . . .
        <add name="TridionWAIHttpModule" type="Tridion.ContentDelivery.Web.WAI.WAIModule, Tridion.ContentDelivery" preCondition="managedHandler" />
   . . .

Does anyone have an idea of the cause of this error?

3 Answers 3


Check your storage configuration (cd_storage_conf.xml or cd_broker_conf.xml for older systems), specifically the storage location for ComponentPresentation items with item extension ".ascx"

You need to ensure that you are publishing your ASCX web controls to the file system and to somewhere within your web application in order that .Net will execute them.

For example:

<Item typeMapping="ComponentPresentation" itemExtension=".Ascx"

By changing the settings in cd_storage_conf.xml so that the default storage area my local file store I found an ascx file corresponding to my component presentation. Once this was present my page was correctly rendered.

                <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
            <Root Path="C:\inetpub\wwwroot" />
       <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
            <Root Path="C:\inetpub\wwwroot\data" />


<ItemTypes defaultStorageId="defaultDataFile" cached="false">
    <Item typeMapping="Page" cached="false" storageId="defaultFile"/>
    <Item typeMapping="Binary" cached="false" storageId="defaultFile"/>

When dynamic component presentations are published as ASCX Controls they must be published to the file system in order to render properly.

  • 3
    That change will cause everything except pages and binaries (unless you have more mappings beneath there) to be published to that data location, which (depending on what you're publishing) could cause more issues. You might want to consider adding a specific mapping for your ASCX Component Presentations and leaving the default as it was Commented Sep 20, 2013 at 15:01
  • Hmm... but David suggested checking your storage config. All you've done is vary this slightly by using a default rather than an explicit mapping. David solved your problem for you and deserves the credit. Or am I wrong? Commented Sep 21, 2013 at 14:26

I'd like to add that the same concept applies to DCPs published as JSP Script. These must be present on the file system.

If an absolute requirement exists to have these published to the Broker DB, then custom code needs to be developed to serialize the JSP or ASCX output into a file prior to trying to render it. You may also try a technique of compiling all in memory (reach out to Mihai's blog for goodness around that: http://yatb.mitza.net).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.