ASP.Net MVC Error: the server responded with a status of 404 (Not Found)

Last Reply one year ago By dharmendr

Posted one year ago

Hello everyone,

I have an MVC5 application and when I run it in Localhost it runs great no errors!

When I publish it and deploy it on my server. (Windows Server 2016 and I tried AWS cloud) and put it on IIS I can get to my home page and my other links but when I run my ajax() and call an Action in my controller I get x.219/Parts/DoPartBookFunc?bookval=8 404 (Not Found)

when I run localhost on the server I get Failed to load resource: the server responded with a status of 404 (Not Found)

but when I debug the app locally it works. I been researching and trying a bunch of different things but so far no luck. Some I tried was @Url.action(“”,””), adding a ~ in front adding ../ in front making a global file and many other things.

If someone knows how to fix this it would be hugely appreciated.

$("#PartBook").on("change", function () {
    var selectV = $(this).val();
    var selectT = $(this).text();
        url: '/Parts/DoPartBookFunc',
        type: 'GET',
        dataType: 'json',
        data: { bookval: selectV },
        //contentType: 'application/json; charset=utf-8',
        success: function (data) {
        //alert("s" + data.PartNextNumber);


This question does not have replies that have been liked.