Mono Support AJAX Control Toolkit (Closed)

Viewed 43815 time(s), 10 post(s), 8/8/2012 10:44:59 AM - by developer
8/8/2012 10:44:59 AM
165 Reputation 19 Total posts

Hello,

I need to use new version of AJAX Control Toolkit - v4.1.60623. When I add it to project references and use component from it, I get this error:

"Could not load file or assembly 'AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

In another thread I found this config settings:

<runtime>
<assemblyBinding>
<dependentAssembly>
<bindingRedirect oldVersion="0.0.0.0-4.1.60623.0"
newVersion="4.1.60623.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>"

I tried it, but it absolutely doesn't work.

Is there a way to use the newest AJAX control Toolkit in Mono-X?



1
8/8/2012 10:46:15 AM
165 Reputation 19 Total posts

<bindingRedirect> settings I tried in machine.config and also in web.config.

2
8/8/2012 8:46:01 PM
15993 Reputation 2214 Total posts

Hi,

please try to use something similar to code below, although this is for older version this approach should work:

<dependentAssembly>
  <assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e"/>
  <bindingRedirect oldVersion="1.0.10920.23476" newVersion="3.0.30930.28736"/>
</dependentAssembly>

Also please take a look at the following
http://www.mono-software.com/Mono/Pages/Discussion/dtopic/5g2sMDkZR0KyP57eAJewDw/Danish-alphabet/?dmsgId=1oZZcSW2IkGAkZ7gAQRexg#Post1oZZcSW2IkGAkZ7gAQRexg 

Regards

3
8/9/2012 11:12:07 AM
155 Reputation 23 Total posts

I guess you were missing the <assemblyIdentity...> so it didn't know which assembly you were speaking of

btw, you may need to have an assembly compiled with same version of .NET of your MonoX build (maybe also doublecheck which .net runtime your apppool uses). I guess a 3 or 3.5 .net assembly would load in .net 4, but the other way arround might not always work (?)

4
8/9/2012 11:32:56 AM
165 Reputation 19 Total posts

Same results, still not working.

Can you explain me differences between mine and yours solution? It seems to me, that your code is the same as mine.

5
8/9/2012 11:37:45 AM
165 Reputation 19 Total posts

I try it also with <assemblyIdentity> and still not working. I use Mono-X .NET4 version and my project is also .NET 4 project.

<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" culture="neutral" />
<bindingRedirect oldVersion="3.0.30930.28736" newVersion="4.1.60623"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

6
8/9/2012 3:28:08 PM
15993 Reputation 2214 Total posts

Hi,

can you please try to use this, we are using this without any issues:

<runtime>
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
     <dependentAssembly>
       <assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-3.0.30930.28736" newVersion="4.1.60623.0" />
     </dependentAssembly>
   </assemblyBinding>
 </runtime>

Note: you have 0 at the end of the AjaxControlToolkit version - 4.1.60623.0

Regards

7
8/9/2012 3:36:14 PM
155 Reputation 23 Total posts

If it's not the ".0" you were mising at the end of "newVersion", an other question is whether you're placing this statement at the correct position in web.config file (guess if you use Visual Studio.net to edit it it will check the schema and also I think ASP.net also checks if it follows the correct XML schema at runtime). So it would remain that you're placing it at wrong web.config (at some parent folder it should work too I think, so should it do at machine.config for all ASP.net I guess)

8
8/15/2012 11:43:28 AM
165 Reputation 19 Total posts

Hello boys,

finally it works. Many thanks to all. Whole problem was based on mising ".0" in newVersion attribute.

9
8/15/2012 12:12:33 PM
15993 Reputation 2214 Total posts

I'm glad that you have fixed the issue, I'm closing the topic and if you have any further questions please open a new one.

Regards

10
This is a demo site for MonoX. Please visit Mono Software for more info.