code formating

Wednesday, December 2, 2009

ASP.NET MVC 2 breaks Json

Staring at the title of the post, some will say that it actually fixes Json. However, what a developer that hasn´t carefully read the release notes of MVC 2 will discover, is the following. After happily installing the shinny new version, if you try to run a project that was initially built using an older version of MVC, Asp.Net will through an error when attempting to return JSON in response to a GET request.

Microsoft has built this in order to protect you against cross-site attacks. If you feel save either because the data to be posted is not worth stealing or for any other reason, to bypass this, add JsonRequestBehavior.AllowGet to the Json return function.

Expose text from Emacs to another device via QR

Expose text from Emacs to another device via QR I am one of those who uses Emacs extensively. Particularly when it comes to keeping myself o...