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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:00:49+00:00 2026-05-31T08:00:49+00:00

I am building a mvc 4 web api but when ever I try to

  • 0

I am building a mvc 4 web api but when ever I try to do a post to the web api the request returns

"The requested resource does not support http method 'POST'."

My Request Headers

User-Agent: Fiddler
Host: localhost:53393
Content-Length: 39
Content-Type: application/json

My Request Body

{
  "username":"",
  "password":""
}

Routes

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "api/{controller}/{id}",
            defaults: new { id = RouteParameter.Optional }
        );

        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
    }

And the method in my controller

[HttpPost]
public MethodResponse Authenticate(string username, string password)
{
    ConsoleServiceClient service = new ConsoleServiceClient();
    return service.Authenticate(username, password);
}

The URL I use

http://localhost:53393/api/service/authenticate

I am still new to this, but can’t figure out why POST is not supported?

Thanks

  • 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-31T08:00:50+00:00Added an answer on May 31, 2026 at 8:00 am

    Try using http://localhost:53393/api/service as your URI because you currently don’t have an {action} segment in your API route.

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

Sidebar

Related Questions

I'm building a RESTful web api with asp.net mvc, which returns pure json data.
I'm building a MVC web application (using the Spring MVC framework), and I'm a
I'm building a Spring MVC web application with Tiles/JSP as the view technology. Previously
I am building a .NET MVC web application. Is cloud hosting the way to
I'm building small web shop with asp.net mvc and Structuremap ioc/di. My Basket class
I am building a web application using ASP.NET MVC that has two very distinct
I am building a web site in C# using asp.NET MVC How can I
I'm am building my asp.net web application using MVC (Preview 5), and am also
I recently started looking into building web applications using .NET MVC and I stumbled
My team is considering building our next web app using the ASP.NET MVC framework.

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.