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 402665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:08:45+00:00 2026-05-12T17:08:45+00:00

I have an ASP.NET MVC application. In the application, I have a bunch of

  • 0

I have an ASP.NET MVC application. In the application, I have a bunch of similarly structured routes for different actions:

/Admin/Addresses/{AddressId}/Delete
/Admin/Phones/{PhoneId}/Delete
/Admin/Notes/{NoteId}/Delete
/Admin/Files/{FileId}/Delete

None of which work… I have been checking the routes and the actions for 5 hours now, and I know they are all written the way they should be, but it’s still 404ing all of them.

The funny thing is that the following routes, which are also similar in structure work just fine:

/Admin/Addresses/{Id}/{Type}
/Admin/Phones/{Id}/{Type}
/Admin/Notes/{Id}/{Type}
/Admin/Files/{Id}/{Type}

The only difference between the two sets is that the delete routes use GET and are supposed to return JSON, while the othere ones use POST and redirect.

Has anyone ran into this before?

EDIT: Here’s a bigger code sample per the requests on the comments. First code sample is of the ONLY working route (which is probably because it’s the first in the list of routes to use the specified url structure) and the second is the next route in line, which isn’t working at all…

Routes.MapRoute("Administration (Delete Employee)", "Administration/Employees/{EmployeeId}/Delete", new {
            controller = "Administration",
            action = "DeleteEmployee"
        });

[AcceptVerbs(HttpVerbs.Get)]
    public JsonResult DeleteEmployee(short EmployeeId) {
        try {
            db.DeleteEmployee(EmployeeId);

            return Json(new IJsonStatus() {
                Success = true
            });
        } catch (Exception ex) {
            Shared.LogWarning(ex);

            return Json(new IJsonStatus() {
                Success = false,
                Exception = ex.Message
            });
        };
    }

And the non-working route:

Routes.MapRoute("Administration (Delete Address)", "Administration/Addresses/{AddressId}/Delete", new {
            controller = "Administration",
            action = "DeleteAddress"
        });

[AcceptVerbs(HttpVerbs.Get)]
    public JsonResult DeleteAddress(int AddressId) {
        try {
            db.DeleteAddress(AddressId);

            return Json(new BaseResponse() {
                Success = true
            });
        } catch (Exception ex) {
            Shared.LogWarning(ex);

            return Json(new BaseResponse() {
                Success = false,
                Exception = ex.Message
            });
        };
    }
  • 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-05-12T17:08:46+00:00Added an answer on May 12, 2026 at 5:08 pm

    Probably could be useful to see your entire route mapping call rather than just a snippet. That stuff is very, very order of operations dependent.

    Second, check out the MVC routing debugger. It helps demystify alot of route mystification issues.

    • 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 with a route similar to: routes.MapRoute(Blog, {controller}/{action}/{year}/{month}/{day}/{friendlyName}, new
I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
In an ASP.NET MVC 3 application, we have a bunch of data that needs
I have an asp.net MVC application that has one section /admin locked down via
Background: I have an ASP.NET MVC application that wraps controller actions in a TransactionScope
I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7
I have an ASP.NET MVC application, when a user clicks on the submit button
I have an Asp.Net MVC application that works in the vs.net development web server.
I have a ASP.NET MVC application using NHibernate and the application runs fine when
I have a ASP.NET MVC application that runs in both IIS 6 and 7.

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.