I get the following exception after installing ASP.NET MVC 4 Beta on a machine with ASP.NET MVC 3.
System.InvalidCastException was unhandled by user c
I had the same problem, but when migrating ASP.NET MVC 3 to ASP.NET MVC 4. This way I got on this topic.
I have found a solution to the problem, but its source is different, it is not from WebPages version.
I have followed the official guide (so to say) Upgrading an ASP.NET MVC 3 Project to ASP.NET MVC 4.
To resolve the problem, you have to add in Web.Config (probably around previously added ones):
..
... some other dependecy redirects ...
... some other dependency redirects ...
Also in the notes is not mentioned to change the Reference of System.Web.Helpers from 1.0.0.0 to 2.0.0.0 (delete and add the new one).