Geeks With Blogs
.Nettuce Code Salad March 2010 Entries
Validation of viewstate MAC failed - MVC

This gave me a WTF moment recently. MVC? Viewstate? Eh!? All was fine on the dev server, but as soon as I deployed to the web farm this error appeared every time I recycled the app pool. It turns out it was the cookie created by <%= Html.AntiForgeryToken() %> and simply generating a machine key sorted it out.

Posted On Sunday, March 14, 2010 2:12 PM

Javascript Twitter Linkify
It's annoying when you know you've seen and used something before only for it to be lost in the myraid of archived Visual Studio projects that litter my hard drive, and I 've no idea of the search terms I used to find it on the net in the first place. Luckily I found some regular expressions that almost worked so rolled my own: function Linkify(text) { text = text.replace(/(https?:\/\/\... function (s) { return '<a href="' + s + '">' + s + '</a>'; }); text = text.replace(/(^|)@(\w+)/gi, ......

Posted On Wednesday, March 3, 2010 11:02 AM

Copyright © Jon Canning | Powered by: