MVC routing - why does my request not match the route?

Posted by Anders Juul on Stack Overflow See other posts from Stack Overflow or by Anders Juul
Published on 2010-05-17T07:33:03Z Indexed on 2010/05/17 7:40 UTC
Read the original article Hit count: 381

Hi all,

I'm making a request that I thought would be caught by my route, but there is no match. What am I doing wrong?

Any comments appreciated, Anders, Denmark

--

Url :

EventReponse/ComingAdmin/386/01e71c45-cb67-4711-a51f-df5fcb54bb8b

Expected match:

        routes.MapRoute(
            "Editing event responses for other user", // Route name
            "EventResponse/{action}/{eventId}/userId", // URL with parameters
            new {controller = "EventResponse", action = "ComingAdmin"} // Parameter defaults
            );

Desired controller (but I guess this does not come into play):

public class EventResponseController : ControllerBase
{
    (...)
    public ActionResult ComingAdmin(int eventId, Guid userId)
    {
        return RegisterEventResponse(eventId, AttendanceStatus.Coming, userId);
    }
}

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-routing