During the development the function below finds the Control and makes the request correctly, however after publishing on the server the function no longer finds the Controller:
During development I have to leave it like this:
url: "/Controller/Action",
When I upload to the server I have to change it and leave it like this:
url: "/MeuSite/Controller/Action",
function carregaComboEmpresa() {
$.ajax({
//url: "/MeuSite/Controller/Action",
url: "/Controller/Action",
type: "post",
dataType: "json",
contentType: "application/json; charset=utf-8",
processData: false,
data: null,
success: function (data) {
},
error: function (result) {
}
});
};