[Mono-bugs] [Bug 664813] System.Web.Mvc.JsonResult.ExecuteResult no longer works, exception is thrown at System.Web.Script.Serialization.JavaScriptSerializer..ctor when application is compiled with dmcs (but still works with gmcs)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Mar 14 20:26:18 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=664813
https://bugzilla.novell.com/show_bug.cgi?id=664813#c1
Marek Habersack <mhabersack at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mhabersack at novell.com
Component|Sys.Web |misc
AssignedTo|mhabersack at novell.com |mono-bugs at lists.ximian.com
Product|Mono: Class Libraries |Mono: Runtime
--- Comment #1 from Marek Habersack <mhabersack at novell.com> 2011-03-15 01:26:17 CET ---
The reason this is happening is that System.Web.Mvc 2.0.0.0 references
System.Web.Extensions 3.5.0.0 while test.exe compiled with dmcs references
System.Web.Extensions 4.0.0.0 - both of them are loaded at the same time and
this line:
ScriptingJsonSerializationSection section = (ScriptingJsonSerializationSection)
ConfigurationManager.GetSection
("system.web.extensions/scripting/webServices/jsonSerialization");
throws the invalid cast exception. It just works on .NET so this is a Mono
runtime issue. The workarounds are:
* recompile System.Web.Mvc with dmcs and put it in your bin/ directory.
* Add the following to web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"
culture="neutral" />
<bindingRedirect oldVersion="3.5.0.0"
newVersion="4.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Reassigning the bug to the runtime.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list