My wisej application works with google charts. Works fine until install the wisej version: 1.5.17.0.
My app works with a [Web Method]
My method calls:
aspNetPanelCantidadJuiciosPorGestor.PageSource = @”DashBoard\WebFormBarrasExpedientesPorGestores.aspx?vCantidadDias=” + DevuelveDiasSinMovimiento()
+ “&vConSentencia=” + chkConSentencia.Checked
+ “&vCodEstado=” + vCodEstado
+ “&vCodDemandanteDemandado=” + vDemandanteDemandado
+ “&vCodGestor=” + vCodGestor
+ “&vAbogadoRepresentante=” + vAbogadoRepresentante
+ “&vCodEstadoCategoria=” + vCodEstadoCategoria;
then in the SERVER SIDE
protected void Page_Load(object sender, EventArgs e)
{
vCantidadDias = Convert.ToInt32(Request[“vCantidadDias”]);
vCodEstado = Convert.ToInt32(Request[“vCodEstado”]);
vCodEstadoCategoria = Convert.ToInt32(Request[“vCodEstadoCategoria”]);
if (Request[“vAbogadoRepresentante”] == null)
vAbogadoRepresentante = “0”;
else
vAbogadoRepresentante = Request[“vAbogadoRepresentante”].ToString();
if (Request[“vCodDemandanteDemandado”] == null)
vCodDemandanteDemandado = “0”;
else
vCodDemandanteDemandado = Request[“vCodDemandanteDemandado”].ToString();
if (Request[“vCodGestor”] == null)
vCodGestor = “0”;
else
vCodGestor = Request[“vCodGestor”].ToString();
vConSentencia = Convert.ToBoolean(Request[“vConSentencia”]);
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static object[] GetChartData()
{
Pretor.Services.Legajos.Legajos legajillos = new Pretor.Services.Legajos.Legajos();
DataTable dtPorCaducar = legajillos.TraeLegajosParaGrillaYGraficos(vCodEstado,
vCodEstadoCategoria,
(vCodEstadoCategoria == 0) ? false : true,
vCodDemandanteDemandado,
vCodGestor,
vCantidadDias, vConSentencia, false,
(vCodEstado == 0) ? false : true, vAbogadoRepresentante);
var chartData = new object[dtPorCaducar.Rows.Count + 1];
chartData[0] = new object[] { “Legajos con ” + vCantidadDias + ” días sin movimientos”, “Total” };
int i = 0;
foreach (DataRow row in dtPorCaducar.Rows) // Loop over the rows.
{
i++;
chartData[i] = new object[]
{
row[1].ToString(), double.Parse(row[0].ToString())
};
}
return chartData;
}
on the client side
<form id=”form1″ runat=”server”>
<script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></script>
<script type=”text/javascript” src=”https://www.google.com/jsapi”></script>
<script type=”text/javascript”>
google.load(“visualization”, “1”, { packages: [“corechart”] });
google.setOnLoadCallback(drawChart);
function drawChart() {
var options = {
title: ‘Legajos con 4 meses sin movimiento.’,
width: 470,
height: 300,
bar: { groupWidth: “100%” },
legend: { position: “left”, textStyle: { fontSize: 8 } },
is3D: true,
};
$.ajax({
type: “POST”,
url: “/DashBoard/WebFormBarrasExpedientesPorGestores.aspx/GetChartData”,
data: ‘{}’,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (r) {
var data = google.visualization.arrayToDataTable(r.d);
var chart = new google.visualization.PieChart($(“#chart”)[0]);
chart.draw(data, options);
},
failure: function (r) {
alert(“Atencion: ” + r.d);
},
error: function (r) {
alert(“Error al Cargar Grafico de Legajos por caducar: ” + r.d);
}
});
}
</script>
<div id=”chart” style=”width: 470px; height: 300px;”>
</div>
</form>
Was working fine until update to the last wisej version 1.5.17.0..
Now the server send this error: Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
HELP PLEASE!
The error seems to be coming from jQuery and Asp.Net Api. Wisej doesnt generate 405 errors. Make sure the the [WebMethod] attribute you are using for Asp.Net is NOT the Wisej WebMethod attributed because Asp.Net doesn’t recognize it. Also, if you upload a small test case we can take a look.
Please login first to submit.