Loading multiple versions of the Telerik.web.ui.skin assemble

4 posts, 0 answers
  1. Scott Manning
    Scott Manning avatar
    20 posts
    Member since:
    Oct 2012

    Posted 20 Nov 2012 Link to this post

    We have two websites, one running off the root as the parent website and the 2nd website running in a standard subdirectory as a child application.  For other technical reasons, we have to run the child application in a standard subdirectory and not as a virtual or application directory.  We are using the probing statement to reference the childapp bin directory

      <runtime>

        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

          <probing privatePath="bin;Childapp\bin"/>

        </assemblyBinding>

      </runtime>

     

    To test this problem out I wrote two small “hello world” applications.  The parent  application is using version 2012.3.1016.40 and the child application is running 2012.1.411.40.  I only have the telerik.web.ui.dll and telerik.web.ui.skin.dll assemblies referenced and have tried setting the “specific version” property on the respective assemblies.

    Below is the parent webpage

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GACWebTest1.Default" %>

     

    <%@ Register Assembly="Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik3" %>

     

    <!DOCTYPE html>

     

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

        <title></title>

    </head>

    <body>

        <form id="form1" runat="server">

        <div>

            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

     

          <telerik3:RadButton ID="RadButton1" runat="server" Text="RadButton1" OnClick="RadButton1_Click" EnableEmbeddedSkins="true" Skin="Forest" ></telerik3:RadButton>

        </div>

        </form>

    </body>

    </html>

     

    Below is the child webpage

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GACWebChild1.Default" %>

     

    <%@ Register Assembly="Telerik.Web.UI, Version=2012.1.411.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik1" %>

     

    <!DOCTYPE html>

     

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

        <title></title>

    </head>

    <body>

        <form id="form1" runat="server">

        <div>

            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

            <telerik1:radbutton runat="server" text="RadButton"  OnClick="RadButton1_Click" Skin="Hay" ></telerik1:radbutton>

        </div>

        </form>

    </body>

    </html>

    <%--  --%>

     

    When viewing the first website (parent or child), the page renders perfectly.  When going to the other website, it generates the following error.

     

    Telerik.Web.UI.RadButton with ID='RadButton1' was unable to find an embedded skin with the name 'Forest'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

     

    Is there a way to explicitly tell what skin assembly to use?  Is there a way to handle this situation?

  2. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 23 Nov 2012 Link to this post

    Hi Scott,

    I tried to reproduce the problem you encountered, but to no avail. Please check the short video that I prepared and let me know if I am missing something important. I have also attached the two websites that I used for the purpose of testing.

    The generated exception is usually examined when the Telerik.Web.UI.Skins.dll assembly is not referenced or its version does not match the version of the main assembly (Telerik.Web.UI.dll). Please check the references in your child website and add the correct assembly if any of the scenarios, mentioned above, is valid in your case.

    If the problem persists, please modify my attachment in order to match your case. If this is not possible, you can also send a simple, fully runnable project so that I can inspect it locally and provide a more to the point answer.

    Regards,
    Slav
    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. Scott Manning
    Scott Manning avatar
    20 posts
    Member since:
    Oct 2012

    Posted 25 Nov 2012 Link to this post

    I noticed in the video that you tried the websites out individually and that works for me also.  When I have it deployed under IIS (version 7.5 in my case) and go to the parent page then manually go to the child website, get the error.  I can get the error if I go to the child web page first and then navigate to the parent.

    Use Case #1

    Goto to

    http://127.0.0.1/default.aspx  <-  This works perfectly

    http://127.0.0.1/childapp/default.aspx <- This will generate the error

    Use Case #2

    Goto to

    http://127.0.0.1/childapp/default.aspx <- This works perfectly

    http://127.0.0.1/default.aspx  <-  This will generate the error

     

  4. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 28 Nov 2012 Link to this post

    Hello Scott,

    Please note that only one version of the RadControls for ASP.NET AJAX can be loaded in a web application project if this is your actual configuration.

    In case you are using separate web applications, you can try adding an appSettings entry with the fully qualified name of the Skins assembly in web.config as shown in the help article How to load skins from external assemblies (step 7). Its version should match the version of the Telerik.Web.UI.dll assembly.

    All the best,
    Slav
    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