This is a migrated thread and some comments may be shown as answers.

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

3 Answers 252 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott Manning
Top achievements
Rank 1
Scott Manning asked on 20 Nov 2012, 12:50 PM

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?

3 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 23 Nov 2012, 01:27 PM
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.
0
Scott Manning
Top achievements
Rank 1
answered on 26 Nov 2012, 01:07 AM

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

 

0
Slav
Telerik team
answered on 28 Nov 2012, 04:43 PM
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.
Tags
General Discussions
Asked by
Scott Manning
Top achievements
Rank 1
Answers by
Slav
Telerik team
Scott Manning
Top achievements
Rank 1
Share this question
or