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:
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:
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
<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