Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
1,891 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 2000 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 64

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 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