RadEditor not loading control on server (works locally)

4 posts, 0 answers
  1. Zeyad
    Zeyad avatar
    10 posts
    Member since:
    Mar 2011

    Posted 26 Jan 2013 Link to this post

    The RadEditor control does not seem to be loading any of its css or js. 

    I am getting a failed to load resource for Telerik.Web.UI.WebResource.axd. I believe the issue is that I am hosting an asp.net site within a subfolder. 

    Here is my web.config code from my subfolder:

    <configuration>
      
      <appSettings>
        <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
        <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />
      </appSettings>
      <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
          </assemblies>
        </compilation>
        <pages>
          <controls>
            <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
          </controls>
        </pages>
        <httpHandlers>
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
          <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
        </httpHandlers>
        <httpModules>
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
        </httpModules>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="RadUploadModule" />
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
          <remove name="RadCompression" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
        </modules>
        <handlers>
          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
        </handlers>
      </system.webServer>
    </configuration>

    I have already marked my subfolder as an application on my host server. Any ideas how to resolve this issue?

    Zeyad
  2. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 28 Jan 2013 Link to this post

    Hello,

    Try the following web.config file:

    <?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      -->
    <configuration>
        <system.web>
            <compilation debug="true" targetFramework="4.0">
                <assemblies>
                    <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                    <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                </assemblies>
            </compilation>
            <authentication mode="Forms">
                <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
            </authentication>
            <membership>
                <providers>
                    <clear/>
                    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
                </providers>
            </membership>
            <profile>
                <providers>
                    <clear/>
                    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
                </providers>
            </profile>
            <roleManager enabled="false">
                <providers>
                    <clear/>
                    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
                    <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
                </providers>
            </roleManager>
            <httpHandlers>
                <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
                <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
                <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
            </httpHandlers>
        </system.web>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true"/>
            <validation validateIntegratedModeConfiguration="false"/>
            <handlers>
                <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler"/>
                <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
                <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler"/>
            </handlers>
        </system.webServer>
    </configuration>

    If this does not help, test with enabled CDN scripts.

    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Zeyad
    Zeyad avatar
    10 posts
    Member since:
    Mar 2011

    Posted 28 Jan 2013 Link to this post

    Thanks. I tired using the web.config file and ran into the following error:
    Unknown server tag 'telerik:RadStyleSheetManager'.

    I tried using enabled CDN scripts and everything looks good, but the radeditor control does not work. I cannot add text and all buttons in the toolbar do nothing.

    Is there a specific way to register the assemblies when using a sub folder on my asp.net server?

    Zeyad
  4. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 31 Jan 2013 Link to this post

    Hi,

    Have you added this declaration in the page with <telerik:RadStyleSheetManager>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

    If the editor is disabled this means that there is a JavaScript error on the page and its scripts are not loaded.

    Note that Telerik.Web.UI.dll is a standard ASP.NET assembly and it could work without problem in sub folders.

    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top