"cannot load assembly" with new version

10 posts, 1 answers
  1. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 29 Dec 2010 Link to this post

    Hi. I wondered if anyone can offer some quick help. I have downloaded the new release of the ajax controls and I tried to add a Grid control and got an error message. When that failed I tried to add a ListView control instead (to see if it was specific to the grid control). I get an error message:

    "There was an error rendering the control. Could not load file or assembly 'Telerik.Web.UI, Version=2010.3.1215.35, Culture=neutral, PublicKeyToken=......" or one of its dependencies. The system cannot find the file specified"

    However, the existing Telerik controls that I already have on the site that I'm developing are working fine.

    Thanks (and Happy New Year)
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Dec 2010 Link to this post

    Hello,


    We cannot use different versions of same dll in single application. You could use latest version of RadControls in your application and remove the any older version from application/GAC.

    The following links would shed some light on this:
    Could not load file or assembly 'Telerik.Web.UI'
    General Troubleshooting
    Meet Telerik.Web.Design.dll


    Happy new year Paul...:)


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 30 Dec 2010 Link to this post

    Hi Shinu

    Thanks for the reply but I have not found a solution to the problem. When I upgraded I used the Telerik installer/upgrader and it also replaced the .dll. In my webconfig there are only short names, ie:

    <

     

    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" />

     

    However, both version are in GAC but I have never manually dealt with the GAC and if I try to uninstall the previous version of the Telerik controls from GAC it says access denied. Setting the folder/file properties so that it isn't read only doesn't change this.

    I'm not sure where to go from here. Any help appreciated. Thanks

  5. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 03 Jan 2011 Link to this post

    Hello Paul,

    Changing the files ReadOnly attribute actually do not give you any permissions.
    Please check this site to see how to set permissions. For uninstalling the assembly follow the steps described here.

    All the best,
    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.
  6. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 03 Jan 2011 Link to this post

    Hi. The information provided is not of any use. As I explained I tried to uninstall the assembly (the previous version of the Telerik Controls) but I get "Access is denied" when I right click the assembly, click "uninstall" and then confirm the uninstall (ie when I do what the msdn instruction say I need to do). I only have one user on this PC which is my with all admin rights.

    I don't care whether or not I uninstall the previous version. All I want is for the new version to work; which I installed using the download and the Telerik installer.

    Thanks
  7. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 04 Jan 2011 Link to this post

    Hello Paul,

    Does this problem occur when you make new sites? Or it occurs only with old sites when you place more controls?
    Did you try to copy the telerik assembly to the \bin folder of your site and reference it from there instead of the GAC?

    Regards,
    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.
  8. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 04 Jan 2011 Link to this post

    Hi. If I create a new site it appears to work fine (following your email I have just very quickly created a blank new site and tried to add a Grid control and that works ok).

    I don't want to make the problem worse. Can you therefore tell me exactly what you suggest in respect to adding the assembly to the bin directory. Do I just copy the single assembly file from GAC? What are the references that need to be changed? Are they all in the webconfig?

    Thanks
  9. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 04 Jan 2011 Link to this post

    Hi. Just a little more info. I have looked through the web.config file for the new site (which appears to work).

    It does not contain a <pages><controls> declaration for the telerik prefix.

    In the httphandlers it only contains an item for Telerik.Web.UI.WebResource.axd whereas my existing site (which isn't now working after the update) contains Telerik.Web.UI.WebResource.axd and Telerik.Web.UI.SpellCheckHandler.axd, Telerik.Web.UI.DialogHandler.aspx and Telerik.RadUploadProgressHandler.ashx

    <system.webServer><handlers> for the new site just adds Telerik_Web_UI_WebResource_axd whereas the existing site has:

    <

     

    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="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" />
    <
    add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />

    Thanks

     

  10. Answer
    Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 04 Jan 2011 Link to this post

    Hello Paul,

    Copy Telerik.Web.UI.dll from the GAC (or from the installation folder of the RadControls for ASP.NET AJAX) to '\bin' folder of your site. Then open your site in visual studio. In solution explorer click on references and delete the Telerik.Web.UI. After that right click on References then select AddReference and browse to the Telerik.Web.UI.dll from your \bin folder.

    If you are not sure how to edit your Web.Config to fix the references you can copy the content of the web.config of the new site (that works fine) to the web.config of the old one.
     
    Greetings,
    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.
  11. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 05 Jan 2011 Link to this post

    Thanks for your help. I have got it working. I have not fully diagnosed the problem but for your info:

    I did not copy the assembly or dll to the website folders. When I performed the upgrade I was asked if I wanted to overwrite the dll in the site bin directory and so I assumed that it had been updated to the latest version. If other attempts to get it working failed I was going to copy the assembly from GAC to the bin folder as a last resort.

    I editted the web.config to remove all references to telerik and then copied lines that referenced telerik from the web.config for a new blank site (which worked).

    That solved the problem. Except:

    (1) the first time I dropped a RadGrid control onto a page I was asked if I wanted to overwrite the dll. I said "No" this time. My assumption (untested) is that when I said Yes to this when upgrading the system made the changes to the web.config that then caused my problems.

    (2) before I modified the web.config the site worked (including telerik controls) but controls such as RadGrid were not rendered in the IDE/Visual Studio and their smart tags were not working. However, I can manually edit source and everything was actually working when I compiled and ran the site. However, after modifying the web.config (to copy references from a new working site) my site would not compile because of several telerik controls (mainly buttons). Just dropping a new telerik button on the page affected cleared the problem.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017