Solved

Error following MVC tutorial: The current request for action 'Create' on controller type 'HomeController' is ambiguous between the following action methods:

Posted on 2011-02-15
2
1,806 Views
Last Modified: 2013-12-17
I am having the following error in Create when following the tutorial below:
The current request for action 'Create' on controller type 'HomeController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Create(System.Web.Mvc.FormCollection) on type ContactManager.Controllers.HomeController
System.Web.Mvc.ActionResult Create(ContactManager.Models.Contact) on type ContactManager.Controllers.HomeController

http://www.asp.net/mvc/tutorials/iteration-1-create-the-application-cs
0
Comment
Question by:DistillingExperts
2 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 500 total points
ID: 34898837
Hi. You can't have the same action name twice, even though they differ in signatures. MVC doesn't know how to route the request.
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 34899750
Hi DistillingExperts;

Did you place the attribute

    [AcceptVerbs(HttpVerbs.Post)]

above the, POST: /Home/Create, Action method?

Fernando
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question