Upgrade to MVC 2 causes Unable to cast object of type ‘System.Web.UI.Triplet’ to type ‘System.Object[]’ relating to AntiForgeryToken

This has something to do with the way that MVC 1 and MVC 2 generate anti forgery tokens. It seems they might do things differently.

The solution is to clear your browser cookies.

James Crowley has a bit of information on it (first link in resources below!)

Resources

http://weblogs.asp.net/james_crowley/archive/2010/03/18/beware-upgrade-to-asp-net-mvc-2-0-with-care-if-you-use-antiforgerytoken.aspx

http://n2cms.codeplex.com/Thread/View.aspx?ThreadId=199385

Advertisements

One Response to “Upgrade to MVC 2 causes Unable to cast object of type ‘System.Web.UI.Triplet’ to type ‘System.Object[]’ relating to AntiForgeryToken”

  1. ASP.NET MVC Archived Blog Posts, Page 1 Says:

    […] to VoteUpgrade to MVC 2 causes Unable to cast object of type ‘System.Web.UI.Triplet’ to type ‘System….Tuesday, March 23, 2010 from jwwishartThis has something to do with the way that MVC 1 and MVC 2 […]


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: