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,768 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 62

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now