function GetUserEditProfileDetails() {
var res = {};
res.ID = parseInt($("#User_ID_EditProfile").val());
res.FirstName = $("#FirstName").val();
res.LastName = $("#LastName").val();
res.EmailId = $("#EmailId").val();
res.Mobile = $("#Mobile").val();
res.ProfilePic = $(".ProfilePic").attr("src");
return res;
}
$.ajax({
url: "Profile/UpdateUser",
async: false,
type: "POST",
data: GetUserEditProfileDetails(),
dataType: "json",
contentType: "application/json; charset=utf-8",
error: function (jqXHR, textStatus, errorThrown) {
alert(JSON.stringify(jqXHR) + "-" + textStatus + "-" + errorThrown);
}
})
By using above code, I am trying to save the details of a user. But when the profile pic is too long then the controller method is not calling and it shows internal server error.
maxAllowedContentLengthto increase the limitmaxAllowedContentLengthinrequestLimitselement to larger number (maximum is 4,294,967,295 or around 4 GB).