My problem is that when making an Ajax request, when I send my information I receive this error:
The Request Filtering module is configured to deny a request when the query string is too long.
I see in other forums that it is because of the huge amount of information sent through a GET request. Does anyone know the solution to this Problem?
Here is an example of the Ajax and Method that I use
$.ajax({
type: "GET",
url: "@Url.Action("nuevaTarjetaCapacitacion", "TarjetaCapacitacion")",
scriptCharset: "iso-8859-1",
dataType: "json",
contentType: "application/json; charset=iso-8859-1",
data: {
TarjetaCapacitacionId: $("#TarjetaCapacitacionId").val(),
NombreCurso: $("#NombreCurso").val(),
Descripcion: $("#Descripcion").val(),
FechaInicio: $("#FechaInicio").val(),
FechaFin: $("#FechaFin").val(),
//TipoCurso: $("#TipoCurso").val(),
Departamentos: tarjetaCapacitacion.Departamentos.toString(),
Puestos: tarjetaCapacitacion.Puestos.toString(),
Personal: tarjetaCapacitacion.Personal.toString(),
Instructores: tarjetaCapacitacion.Instructores.toString(),
InstructoresExternos: JSON.stringify(tarjetaCapacitacion.InstructoresExternos),
Documentos: tarjetaCapacitacion.Documentos.toString(),
AprobacionId: $("#AprobacionId").val()
}
public JsonObject nuevaTarjetaCapacitacion(string NombreCurso, string Descripcion, string FechaInicio, string FechaFin, /*string TipoCurso,*/ string Departamentos, string Puestos, string Personal, string Instructores, string InstructoresExternos, string Documentos, int? AprobacionId)
{
}