ASP.NET MVC4 || C#
I have a MenuRole page which displays list of menu from the database.Users have to select a Role and corresponding menus from the page.All was going well but when i tried to save the data I am getting the following error.
'The request filtering module is configured to deny a request where the query string is too long'.I an using jquery ajax for saving the detaiils and I found out that the parameters are passing as querystring from view to the controller which I think is not an ideal scenario.
Is this the default behaviour of passing data when using jquery ajax in the form?
How can the issue be solved?
error message
Requested URL
JQuery ajax for saving the details
$("#btnSubmit").click(function () {
var formData = $('#frmRoles').serialize();
$.ajax({
type: "POST",
url: "@Url.Action("Add","MenuSettings")",
data: formData,
datatype: "json",
success: function (data) {
toastr.success(data.message)
},
error: function (data) {
toastr.error(data.message);
}
});
})


Addmarked with[HttpPost]?FormMethod.Postby default. And I suspect you must also be doing both the standard submit and the ajax post if that's happening - is$("#btnSubmit")a submit button? - if so addreturn false;as the last line of the script to cancel the default