I implemented the Razor equivalent for the solution described in the accepted answer for this Question: jQuery Ajax calls and the Html.AntiForgeryToken() But I kep
When you call CallAjax(), where is data coming from? I ask because, usually when your data comes from a form then your CSRF token is already part of the form, typically in a hidden field.
So if your data is all coming from a form, then you should just make sure that the token is a hidden part of that form and the token should automatically be included.
If your data is coming from somewhere other than a form, then it is understandable that you would stash your token somewhere and then include it after the data has been assembled. But you might consider adding the token to the data, rather than building a new object from the token and then adding all the data to it.
if (type == 'POST') {
data._RequestVerificationToken = $("input[name='__RequestVerificationToken']").val();
ajaxOptions.processData = false;
ajaxOptions.contentType = false;
}