1

I ran into an issue where I have an Ajax Post that generates a document serverside. It works great on localhost but when it's published on server side, I receive a 404 in the console.

Here's my code ajax call:

$("#btn1330").on("click", function () {
    $("#loading").show();
    $.ajax({
        method: "POST",
        url: "/AdminReports/GenerateForm1330",
        data: {
            urd: {
                "URSID": $(".form-1330-input").val() //this is a string value
            }
        }
    }).done(function () {
        $("#loading").hide();
    });
});

It is received on controller side (AdminReports) with this:

[HttpPost]
public JsonResult GenerateForm1330(UnlimitedReleaseDocument urd)
{
 //my code for generating a document and saving to desktop is here
  return Json(true)
 }

On localhost, this works as expected with a 200 success, however, when pushed to staging, I see the following error in console:

> POST https://urs-staging.jpl.nasa.gov/AdminReports/GenerateForm1330
> 404 (Not Found)

Any ideas as to why this doesn't work on staging/production? The URL in the console error is exactly the route that it needs to hit so I'm confused! Thanks in advance!

Jordan Lewallen
  • 1,681
  • 19
  • 54

0 Answers0