jquery - Sorry, an error occurred while processing your request C# and Ajax -


i making ajax call, , in local environment works, when go server starts giving problem.

the error appears: sorry, error occurred while processing request f-12 google chrome appears: failed load resource: server responded status of 500 (internal server error)

jquery:

function converter(origem, destino, tipo) {   $.ajax({       type: "get",       url: "@url.action("converter", "home")",       data: {acoordenada: origem.val(), atipo: tipo},       success: function (msg) {           destino.val(msg);       }   }); }; 

controller:

public jsonresult converter(string acoordenada, string atipo) {     var orientacao = "";     acoordenada = acoordenada.replace(".", ",");     decimal coordenada = convert.todecimal(acoordenada);     coordenada = math.abs(coordenada);      int coorhora = (int)coordenada;     coordenada = (coordenada - coorhora) * 60;     int coormin = (int)coordenada;     coordenada = (coordenada - coormin) * 60;     decimal coorseg = math.round(coordenada, 3);      return json(coorhora.tostring() + "° " + coormin.tostring() + "' " + coorseg.tostring() + "'' " + orientacao, jsonrequestbehavior.allowget); } 

url send parameters:

http://localhost/home/converter?acoordenada=-49.06022071838379&atipo=lng 

[]s!

my local environment standard en-br , server international ... added in web.config command , worked ...

<globalization enableclientbasedculture="true" uiculture="pt-br" culture="pt-br"/> 

tks help


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -