[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



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 references
System.Web.Extensions while test.exe compiled with dmcs references
System.Web.Extensions - both of them are loaded at the same time and
this line:

ScriptingJsonSerializationSection section = (ScriptingJsonSerializationSection)

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:

      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <assemblyIdentity name="System.Web.Extensions"
                              culture="neutral" />
            <bindingRedirect oldVersion=""

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