Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7841343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:04:45+00:00 2026-06-02T16:04:45+00:00

I have an ASP.Net MVC 3 application that uses a jQuery .ajax call to

  • 0

I have an ASP.Net MVC 3 application that uses a jQuery .ajax call to POST to a server-side controller action as follows

Client-Side jQuery call:

//Page the server
        $.ajax({
                url: '/Home/Call_Abort',
                type: 'POST',
                data: "{ 'op_id': '" + ajaxOPID + "', 'statMsg': '" + ajaxStatMsg + "'}",
                contentType: 'application/json; charset=utf-8',
                success: function (data) {
                        window.location.href = data.redirectUrl;
                },
                error: function (xhr, ajaxOptions, thrownError) {
                        alert("Error while paging the server to abort.  Reported error: '" + xhr.responseText + "'.");
                }
        });

Server-controller action:

[HttpPost]
public JsonResult Call_Abort(string op_id, string statMsg)
{
    return Json(new
    {
        redirectUrl = Url.Action("Operator_Home", "Home", new { op_id = op_id, status = statMsg }),
        isRedirect = true
    });

}

The return URL is supposed to redirect the user to a different View (i.e. the Operator_Home View). This works on my local development PC, routing to the Operator_Home View as expected, but when I run it on my Development Web Server (Server 2008 with IIS 7) to test, I get the following 404 error page thrown as the xhr.responseText result in the .ajax call above.

enter image description here

It seems like what’s happening is instead of redirecting to the View I specify in the redirectURL (i.e. Operator_Home), it seems to think the Call_Abort controller action is supposed to return a Call_Abort View, since no such View exists the error below gets tossed. But why would this happen on the Web Server and not on my local PC running the Visual Studio dev server? Is there some setting I need to make adjust for my application on IIS in order to get it to behave as it does on my development machine. My understanding of MVC routing isn’t clear enough to know why this is occurring. Any help or insight is appreciated.

UPDATE

My apologies, there are several servers I’m working with at my place of employemnt, I was referencing the wrong web server. The server I’m running this on is Server 2008 with IIS7

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:04:50+00:00Added an answer on June 2, 2026 at 4:04 pm

    The error turned out to be an issue with the URL in tha .Ajax call I modified the URL as follows:

    //Page the server
    var abortURL = window.location.origin + '/myApp/Home/Call_Abort';
            $.ajax({
                    url: abortURL,
                    type: 'POST',
                    data: "{ 'op_id': '" + ajaxOPID + "', 'statMsg': '" + ajaxStatMsg + "'}",
                    contentType: 'application/json; charset=utf-8',
                    success: function (data) {
                            window.location.href = data.redirectUrl;
                    },
                    error: function (xhr, ajaxOptions, thrownError) {
                            alert("Error while paging the server to abort.  Reported error: '" + xhr.responseText + "'.");
                    }
            });
    

    This resolved the issue and allowed jQuery to complete the POST.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC application that uses jQuery 1.3.2. On several of the
We have a ASP.NET MVC 3 application that uses unobtrusive jQuery validation. The page
I have an ASP.Net MVC application that uses SQL Server 2005 via NHibernate. I
I have an ASP.NET MVC 3 application with an action that uses both the
I have an ASP.NET MVC view that uses jquery.Uploadify to post files to one
We have a web based (ASP.NET MVC) application that uses SQL Server 2008 for
I have an ASP.NET MVC application that uses Linq to SQL repositories for all
I have an application (ASP.NET MVC) that uses a Next New method to get
I have an Asp.Net MVC application that works in the vs.net development web server.
I have an ASP.NET MVC 3 (using Entity Framework 4.2) application that uses transactions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.