i use jquery post method in site. it's work in localhost but not work in Host.
$.post('/Home/GetCityLists', null, function (data) {
var Data = JSON.parse(data);
for (item of Data) {
CitiesList.push({ label: item.CityName, value: item.CityId, desc: item.StateName })
}
});
Controller:
[HttpPost]
public string GetCityLists()
{
return ConvertToJson(RunSp("MainDB", "Data", "uspGetCitys").Tables["tblCitys"]);
}
Error in host:
POST mysite.com/Home/GetCityLists 500 (Internal Server Error)
try-catchblock and see what's the exceptionInternal Server Errorthrows?