I am getting the below error any idea?? I get this error message only when the controller call ValidateForm() method.
Could not load file or assembly 'System.Web.Abstractions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's ma开发者_JAVA百科nifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The correct version of the assembly is 3.5.0.0. I guess you are using something compiled against a custom build version of this assembly. You could use a bindingRedirect to instruct the CLR to load the correct version of the assembly.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Abstractions"
publicKeyToken="31bf3856ad364e35"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0"
newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
That version number looks suspect, since the only proper version I can find on my machine is version 3.5. Might your code have been compiled against a CTP/Beta/Preview version?
精彩评论