Welcome to AspAdvice Sign in | Join | Help

AssemblyBinding in Web Config and XMLNS

Ran into this (again, I think) today while setting up some assembly binding between Telerik and PeterBlum controls in my LakeQuincy web site.  The short version is that the presence of an xmlns= in your <configuration> node of web.config will prevent ASP.NET 2.0 from reading any assemblyBinding tag.  So if you have something like this:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

You will want to replace it with this:

<configuration>

Then your <assemblyBinding> tags in your <runtime> element (like the one shown below) should magically work ok:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="RadComboBox.Net2" publicKeyToken="175e9829b585f1f6" culture="neutral" />

<bindingRedirect oldVersion="2.0.0.0-2.4.0.0" newVersion="2.5.0.0" />

</dependentAssembly>

</assemblyBinding>

Otherwise you may encounter something like this error:

Could not load file or assembly 'RadComboBox.Net2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=175e9829b585f1f6' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Published Wednesday, November 15, 2006 7:19 PM by ssmith
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: AssemblyBinding in Web Config and XMLNS

That saved my day, I ran into this, too, and couldn't find the solution. Thanks!

Frithjof

Monday, January 29, 2007 4:02 AM by Frithjof

# re: AssemblyBinding in Web Config and XMLNS

Good ! thank the author.

Monday, July 16, 2007 6:46 AM by 窃听器

# re: AssemblyBinding in Web Config and XMLNS

How to access the tag assemblyIdentity from .net

Thursday, September 13, 2007 12:55 AM by Jeet

# re: AssemblyBinding in Web Config and XMLNS

Thanks so much. Our symptom was a radgrid inside an ajax updatepanel stopped posting back. This saved our butt. Thanks!

Thursday, February 28, 2008 10:51 AM by John C

# re: AssemblyBinding in Web Config and XMLNS

Thanks! I was really scratching my head over this.

Monday, August 18, 2008 6:00 PM by Joe Herr

# re: AssemblyBinding in Web Config and XMLNS

Is there a way to specify the <runtime> element, along with all the children, in a separate file and refer it in web.config. I have tried using attribures 'file', 'Source' and 'configSource'; none of them seems to be working.

Can we define this element in a separate file at all? Is there any restriction on what settings can be defined externally and referred to in web.config?

Thursday, September 11, 2008 1:01 PM by SriniRao

# re: AssemblyBinding in Web Config and XMLNS

Thank you - that worked.

Thursday, May 14, 2009 12:57 PM by Fred

# re: AssemblyBinding in Web Config and XMLNS

What is the problem of

xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> ???

thanks.

Friday, June 05, 2009 6:29 AM by preguntoncojonero

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below