When the size of the array is less then I am able to call the action in the controller. If array size increases then I am not able to call the action.
In the code vendorPackage
is an array whose size is causing the issue.
var data = {
vendorData: vendorPackage,
mopSystemNumber: mopSystemNumber
};
$.ajax({
url: '/MOP/SomeActionName',
data: data,
async: false,
type: 'post',
success: function(result) {},
error: function(xhr, ajaxOptions, error) {}
});
This is Action:
public void SomeActionName(List<Model.VendorData> vendorData, List<Model.VendorData> vendorData2, int mopSystemNumber)
{
try
{
mopServiceAgent.PostVendorDetails(vendorData, mopSystemNumber, dt, userID);
}
catch (Exception ex)
{
utilityServiceAgent.LogExceptionMessageHandler(ex.Message, "MOPController-PostVendorDetails", dt, userID);
}
}