}
public MvcHtmlString AntiForgeryToken(string salt, string domain, string path) {
- return new MvcHtmlString(AntiForgery.GetHtml(ViewContext.HttpContext, salt, domain, path).ToString());
+ //Disabled to compile MVC3 with the newer System.Web.WebPages helpers
+ //return new MvcHtmlString(AntiForgery.GetHtml(ViewContext.HttpContext, salt, domain, path).ToString());
+ return new MvcHtmlString(AntiForgery.GetHtml().ToString());
}
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "For consistency, all helpers are instance methods.")]
}
}
- internal Action<HttpContextBase, string> ValidateAction {
+ internal Action ValidateAction {
get;
private set;
}
: this(AntiForgery.Validate) {
}
- internal ValidateAntiForgeryTokenAttribute(Action<HttpContextBase,string> validateAction) {
+ //Modified to compile MVC3 with the newer System.Web.WebPages helpers
+ internal ValidateAntiForgeryTokenAttribute(Action validateAction) {
Debug.Assert(validateAction != null);
ValidateAction = validateAction;
}
throw new ArgumentNullException("filterContext");
}
- ValidateAction(filterContext.HttpContext, Salt);
+ //Modified to compile MVC3 with the newer System.Web.WebPages helpers
+ ValidateAction();
}
}
}