Calling an action method that return Json is not woking when i publish my web application on IIS

Instead of this $.getJSON("/Rack/LoadZoneByDataCenter", { id: idDC }, one should do

 $.getJSON("@Url.Content("~/Rack/LoadZoneByDataCenter")", { id: idDC },

to resolve the URL

My hunch would be this is where your issue is:

$.getJSON("/Rack/LoadZoneByDataCenter", { id: idDC },



A lot of times when you publish to something other than your local development version, the relative URIs change.