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

Registration of telerik httpHandlers

4 Answers 311 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 05 Feb 2009, 09:56 AM
I was using version 2008.3.1125 of the RadControls in a project. Because of this, I had the following entries in my web.config file:

<system.web> 
    <httpHandlers> 
        <add path="Telerik.Web.UI.DialogHandler.aspx" 
            type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
            verb="*" validate="false" /> 
        <add path="Telerik.Web.UI.SpellCheckHandler.axd" 
            type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
            verb="*" validate="false" /> 
        <add path="Telerik.Web.UI.WebResource.axd" 
            type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
            verb="*" validate="false" /> 
    </httpHandlers> 
</system.web> 
<system.webServer> 
    <handlers> 
        <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" 
            type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
        <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" 
            type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
    </handlers> 
</system.webServer> 
 

After updating the RadControls to the latest version (by modifying the file bin/Telerik.Web.UI.dll.refresh to point to the new version), I got the following runtime errors when opening a page:

Could not load file or assembly 'Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

After some searching, I found out that this is caused by the registration of the HttpHandlers, because the web.config entries include the exact version of the telerik DLL used at the time the controls were added to the project.

The problem was finally solved by removing the version number from the handler registrations, e.g:

<add path="Telerik.Web.UI.DialogHandler.aspx" 
    type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" 
    verb="*" validate="false" /> 
 

My question is: why are the HttpHandlers registered including the version number, culture and public key? Wouldn't it make more sense (and make the life of developers easier), if the handlers were registered without the version number?

Thanks.

---
Martin

4 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 05 Feb 2009, 10:00 AM
Hello Martin,

Yes, it would. From the SP2 release our HTTP handlers should register without the version, culture and public key.

Sincerely yours,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Lyle Groome
Top achievements
Rank 2
answered on 19 Mar 2009, 10:19 PM
I'm getting this problem also, but I never did have the versions in my http handler sections of my Web.config file.

What else could cause this message?

Could the old dll version be cached somewhere?  I've deleted temporary internet files, deleted my \Local Settings\Application Data\Microsoft\WebsiteCache, deleted my C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files, deleted the bin folder dlls and left only the refresh file pointing to the new version of the Telerik.Web.UI.dll.

Still no use. 

I don't get it on every page either. Not that this is the reason but it's a page in a rad window in another rad window.
Opening the first rad window has no problems and it is using telerik controls also. The nested radwindow gets the following error:
Could not load file or assembly 'Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
0
Georgi Tunev
Telerik team
answered on 20 Mar 2009, 09:40 AM
Hi Lyle,

Have you checked the registration of the controls in the pages where you get such error. If they are registered with the version there, this will cause a problem like the one that you report.

If this doesn't help, please open a support ticket and send us your project so we could check it.


All the best,
Georgi Tunev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Lyle Groome
Top achievements
Rank 2
answered on 20 Mar 2009, 09:52 PM
Turns out there was a reference to an old telerik dll inside one of the assembly projects that my website includes.
Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Lyle Groome
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or