HTTP Error 405.0 - Method not allowed error in asp.net mvc 4 post method
NickName:Massey Ask DateTime:2015-06-11T10:00:20

HTTP Error 405.0 - Method not allowed error in asp.net mvc 4 post method

I have an existing asp.net mvc 4 solution. It has several controllers/models/views in separate folders and all work fine with both GET and POST controller methods. I have added a new folder and added its own controllers/models/views. When I call the GET controller method, from the view it works fine. But the POST controller method throws

HTTP Error 405.0 - Method not allowed. The page you are looking for cannot be displayed because an invalid method (HHTP verb) is being used.

The following is my view and controller

<div id="usercreds" class="items">
   @using (Html.BeginForm("SaveCustomer", "NewCustomer"))
   {
        //form control code here               
   }

   [HttpPost]
   public ActionResult SaveCustomer(NewCustomerModel newCustomer)
   {
        //more code here
   }

I added FormMethod.Post in the Html.BeginForm method and added modules="IsapiModule" in web.config file

I still get the same error.

Copyright Notice:Content Author:「Massey」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30770331/http-error-405-0-method-not-allowed-error-in-asp-net-mvc-4-post-method

More about “HTTP Error 405.0 - Method not allowed error in asp.net mvc 4 post method” related questions

HTTP Error 405.0 - Method not allowed error in asp.net mvc 4 post method

I have an existing asp.net mvc 4 solution. It has several controllers/models/views in separate folders and all work fine with both GET and POST controller methods. I have added a new folder and ad...

Show Detail

HTTP Error 405.0 - Method Not Allowed

We are deploying one site asp.net 1.1 on Windows Web Server2008 R2 running IIS 7.5 on standalone PC. it is working perfectly on the 2003 machine. The 2008 machine is the one giving below trou...

Show Detail

HTTP Error 405.0 - Method Not Allowed in IIS Express

When issuing a perfectly cromulent verb to a local IIS Express web-site under Visual Studio 2013: CROMULENT http://localhost:7579/Handler.ashx HTTP/1.1 Host: localhost:7579 the server responds wi...

Show Detail

405.0 Method not allowed on IIS 7.5

A web application with IIS 7.5, ASP.NET, MVC 4 and Windows Identity Foundation is throwing following error: Error HTTP 405.0 - Method Not Allowed Module: StaticFileModule Notification:

Show Detail

HTTP Error 405.0 - Method Not Allowed, with POST

I am trying to use isset($_POST['Save']) in my php file to save result in database. echo "&lt;form action='' method='POST'&gt;"; echo "&lt;input name='Save' type='submit&

Show Detail

HTTP Error 405.0 - Method Not Allowed

I have a have rented a server at www.unoeuro.com (I dont know if this matters) When i submit the form it gives me "HTTP Error 405.0 - Method Not Allowed" &lt;?php define('DB_NAME'

Show Detail

ASP MVC: HTTP Error 405.0 - Method Not Allowed

I have ASP MVC 4 Visual Studio 2017 project running in my Windows 10 machine. When my page loads, it makes jquery ajax post call to load contents of the page. Now when i run the project, it is givi...

Show Detail

HTTP Error 405.0 - Method Not Allowed in ASP.net MVC5

I am continuously getting the following message while running my application. HTTP Error 405.0 - Method Not Allowed The page you are looking for cannot be displayed because an invalid method (...

Show Detail

HTTP Error 405.0 - Method Not Allowed while Form Post

I posted a request to payu server via form submit using angularjs now once payment is completed payu will return a response with hash.But when it hits my success page i get "HTTP Error 405.0 - Meth...

Show Detail

Facebook C# SDK CanvasAction results in "HTTP Error 405.0 - Method Not Allowed"

In my Facebook app I'm using the CanvasAction like so: &lt;div id="my-button" onclick="location.href='@Url.CanvasAction("Index", "Facebook")'"&gt; which should invoke the Ind

Show Detail