我遇到了MVC 3路由问题。我在Global.asax中有这个功能:
routes.MapRoute("Invitations",
"api/invitations",
new { controller = "Invitations", action = "Invitation" });
我有一个控制器:
public class InvitationsController : Controller
{
[HttpPut]
public JsonResult Invitation(InvitationResponse invitationResponse)
{
//code
}
}
问题是我收到错误NotFound or The resource cannot be found
。有谁能看到这个问题?
编辑:我使用的URL是“http:// localhost:6055 / API / Invitations”