If you are trying to pass anonymous dynamic objects to a Razor view you will run into this error. That is because as of C# 5.0 anonymous dynamic objects are compiled as internal.
Considering that views are compiled into a completely separate assembly from controllers, by the time your view model is reaching Razor it just simply won’t have visibility of it, reason why you get the error. so in a nutshell, for now:
Dynamic anonymous objects are not supported by the default MVC engine.
you can always hack around it by doing casts to ExpandoObject and other tricks, however, my recommendation is to change your code to use a named class so you’re not putting in workarounds which may (and probably and hopefully will) become obsolete with future versions for the framework.
If you get this message when trying to run a PHP web app on IIS it is very likely that you have installed the PHP module using web platform installer but have forgotten to turn the CGI windows feature on in your OS configuration.
so go to control panel -> Programs And Features -> Turn windows features on/off -> Internet Information Services -> World Wide Web Services -> Application Development Features
and finally tick CGI. right here:
If you are getting this pesky error on a message box every time you fire up VS 2012 with an ASP.Net MVC 5 project most likely it means that you haven’t updated your environment to Update 4.
Whilst everything will work just fine and doing this won’t affect the actual running of the site, VS 2012 will remain confused until you upgrade which will apply the necessary fix.
Most likely you are connected to a Sql Server 2012 database but using an older client while trying to create a new table or database. Upgrade to Management Studio 2012 and everything should work.