I had trouble with rjcox's solution, but I found modifying his included code to below, worked for me. public class MasterPageBugFix : System.Web.Mvc.ViewMasterPage
{ public new TViewData ViewData { get { TViewData d = (TViewData) this .ViewContext.ViewData; if ( null == d) { throw new InvalidOperationException...