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

Telerik with GAC

2 Answers 373 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 26 Jan 2011, 03:34 PM
Hi
I have been working with Telerik for awhile now in my Web Projects and have had no issues. Recently, we have been attempting to take use of the GAC in our Servers to stop duplicating deployment of our dll files. ie(Telerik.Web.UI.dll) I opened (Control Panel -> Administrative Tools -> Microsoft .NET 2.0 Configuration) Then I expanded MyComputer from this tool and selected Assembly Cache. I right clicked and selected "Add". I then browsed to [ C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q3 2010\Bin35\Telerik.Web.UI.dll ], which is the dll I am experimenting with using in the GAC system. It then added it to the Assembly Cache List as Telerik.Web.Ui   with  Version 2010.3.1317.35 and a public key. It appears to be all in there properly. I did the same with the Telerik.Web.Design.dll as well.

I have done this on both the Deployed Dev Server and my local machine for development.

Next I removed my Reference to the Telerik stuff in my bin folder and have tried pointing it to the Visual Studios10 folder where it is stored in public assemblies with the Correct Version. I have also tried pointing it to the Telerik folder as listed above and finally I have tried pointing it through to the Microsoft_MSIL\Telerik referencing the GAC as well. Regardless of where I point it, if I turn off make local copy and remove it from the dll from my bin folder, nothing will build anymore. I keep getting Telerik.Web.UI reference is incorrect or not found type of errors. I have tried adding an

<compilation debug="true" defaultLanguage="vb" strict="false" explicit="true">
      <assemblies>
            <add assembly="Telerik.Web.UI, Version=2010.3.1317.35, Culture=netrual, PublicKeyToken=121gae78165ba3d4" />

in the web.config file.

I also have the
  ( code snippet
<controls>
        <!-- Required for AJAX -->
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      </controls>

<httpHandlers>
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <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" />
    </httpHandlers>
    <!-- Required for AJAX -->
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
    </httpModules>
  </system.web>
  <!-- Required for AJAX -->
  <!-- Required for AJAX -->
  <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    --><system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="ScriptModule" />
      <remove name="RadUploadModule" />
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0" />
    </modules>
    <handlers>
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ChartImage_axd" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode, runtimeVersionv2.0" />
      <!--<add name="Telerik.Web.UI.WebResource_axd"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2010.3.1317.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0" />-->
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
    </handlers>
)



Then at the top of any page using Telerik stuff has the reference tag:

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


Sorry to overload with information, but I can't figure out what I'm doing wrong. Why is it requiring me to have the 2010.3.1317.35 version of Telerik.Web.UI in my bin folder when it is already in the GAC on my local machine and the Server that it is going to deploy to. Not to mention I reference it from my local machine without local copy so it shouldn't matter if it is in GAC on local machine anyways. However, that is where the problem starts is the second I remove it from the bin folder on my local machine OR the server where it deploys.

HELP PLEASE!


Thanks in advance for taking the time to help me solve this issue.

Sam

2 Answers, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 28 Jan 2011, 09:43 AM
Hi Sam,

When referencing from GAC, you should use the fully qualified name of your assembly.
In the top of your page, instead of:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
Use:
<%@ Register Assembly="Telerik.Web.UI, Version=2010.3.1317.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

And if you want to register the controls for all pages in your project you have to add the following code in your web.config:
<controls>
   <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI, Version=2010.3.1317.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
</controls>

Best wishes,
Vasil
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Sam
Top achievements
Rank 1
answered on 28 Jan 2011, 02:35 PM
You ROCK!,

That fixed it all. Worked first try and runs great. Thank you very much for your help!

Sam
Tags
General Discussions
Asked by
Sam
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Sam
Top achievements
Rank 1
Share this question
or