I am trying to fill a table dynamically through a simple ajax and I can not get past this error. The codes I have are the following:
familia.js
function sendDataAjax() {
$.ajax({
type: "POST",
url: "Familia.aspx/ListarFamilia",
data: {},
contenttype: 'application/json; charset=utf-8',
error: function (xhr, ajaxOptions, thrownError) {
console.log(xhr.status + "\n" + xhr.responseText, "\n" + thrownError);
},
success: function (data) {
console.log(data);
}
});
}
//Llamar a la función que llena la tabla
sendDataAjax();
tabla.aspx.vb
....
....
<WebMethod>
Public Function ListarFamilia() As List(Of EE.EE.eeFamilia)
Dim lst As New List(Of EE.EE.eeFamilia)
Try
lst = BLL.BLL.bllFamilia.getInstancia.ListarFamilia
Catch ex As Exception
lst = Nothing
End Try
Return lst
End Function
The server is the local IIS Express that Visual Studio brings, where even other calls to AJAX work for me without problems. the list of the .vb brings it complete and without problems, with the data of the DB.
What I tried so far was to enlarge all the buffers that AJAX manages from the web.conf, in addition to several different things found on the internet, without any change.
I appreciate any help!
Slds, = DNA =